Codebase list golang-github-go-kit-kit / 3f7d267
code review cleanup JP Robinson 7 years ago
1 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
139139 e.mgr.Put(err)
140140 }
141141
142 func (e *Emitter) flush(conn io.Writer) error {
143 w := bufio.NewWriter(conn)
142 func (e *Emitter) flush(w io.Writer) error {
143 bw := bufio.NewWriter(w)
144144
145145 for _, c := range e.counters {
146 c.flush(w, e.prefix)
146 c.flush(bw, e.prefix)
147147 }
148148
149149 for _, h := range e.histograms {
150 h.flush(w, e.prefix)
150 h.flush(bw, e.prefix)
151151 }
152152
153153 for _, g := range e.gauges {
154 g.flush(w, e.prefix)
154 g.flush(bw, e.prefix)
155155 }
156156
157 return w.Flush()
157 return bw.Flush()
158158 }