clone is used in tests.
()
| 336 | |
| 337 | // clone is used in tests. |
| 338 | func (b *Buffer) clone() *Buffer { |
| 339 | c := *b |
| 340 | c.buf = append([]byte(nil), b.buf...) |
| 341 | return &c |
| 342 | } |
| 343 | |
| 344 | // makeSlice allocates a slice of size n. If the allocation fails, it panics |
| 345 | // with ErrTooLarge. |
no outgoing calls