pkg/broadcastwriter: avoid alloc w/ WriteString
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
This commit is contained in:
parent
7923701584
commit
d98dd3ecef
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ func (w *BroadcastWriter) Write(p []byte) (n int, err error) {
|
|||
for {
|
||||
line, err := w.buf.ReadString('\n')
|
||||
if err != nil {
|
||||
w.buf.Write([]byte(line))
|
||||
w.buf.WriteString(line)
|
||||
break
|
||||
}
|
||||
for stream, writers := range w.streams {
|
||||
|
|
Loading…
Reference in a new issue