Leaky buffer based on examples in Effective Go.