code: func (b *ByteBuf) SetWriterIndex(newWriterIndex int) error {
  	if newWriterIndex < b.readerIndex || newWriterIndex > b.Capacity() {
  		return io.ErrShortBuffer
  	}
  
  	b.writerIndex = newWriterIndex
  
  	return nil
  }
docs: // SetWriterIndex set the write index