Skip to content

Commit

Permalink
chore: fix lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Aug 7, 2023
1 parent 77df8d2 commit 8794476
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions w.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ func (w *Writer) ResetWriter(out io.Writer) {
}

// Grow grows the underlying buffer.
// It calls (*bytes.Buffer).Grow(n int) on b.Buf
func (b *Writer) Grow(n int) {
buf := bytes.NewBuffer(b.Buf)
//
// Calls (*bytes.Buffer).Grow(n int) on w.Buf.
func (w *Writer) Grow(n int) {
buf := bytes.NewBuffer(w.Buf)
buf.Grow(n)
b.Buf = buf.Bytes()
w.Buf = buf.Bytes()
}

// byte writes a single byte.
Expand Down

0 comments on commit 8794476

Please sign in to comment.