code: func (b *ByteBuf) Write(p []byte) (int, error) {
  	n := len(p)
  	b.Expansion(n)
  	copy(b.buf[b.writerIndex:], p)
  	b.writerIndex += n
  	return n, nil
  }
docs: // Write appends the contents of p to the buffer, growing the buffer as
  // needed.