func (cb *Buffer) Skip(count int) error {
	if count < 0 {
		return fmt.Errorf("proto: bad byte length %d", count)
	}
	newIndex := cb.index + count
	if newIndex < cb.index || newIndex > len(cb.buf) {
		return io.ErrUnexpectedEOF
	}
	cb.index = newIndex
	return nil
}
Skip attempts to skip the given number of bytes in the input. If
the input has fewer bytes than the given count, io.ErrUnexpectedEOF
is returned and the buffer is unchanged. Otherwise, the given number
of bytes are skipped and nil is returned.
package codec
import (
	"fmt"
	"io"
)
type Buffer struct {
	buf   []byte
	index int
	tmp []byte
	deterministic bool
}
func NewBuffer(buf []byte) *Buffer {
	return &Buffer{buf: buf}
}
func (cb *Buffer) SetDeterministic(deterministic bool) {
	cb.deterministic = deterministic
}
func (cb *Buffer) IsDeterministic() bool {
	return cb.deterministic
}
func (cb *Buffer) Reset() {
	cb.buf = []byte(nil)
	cb.index = 0
}
func (cb *Buffer) Bytes() []byte {
	return cb.buf[cb.index:]
}
func (cb *Buffer) String() string {
	return string(cb.Bytes())
}
func (cb *Buffer) EOF() bool {
	return cb.index >= len(cb.buf)
}