code: func (f *Buffer) Seek(offset int64, whence int) (idx int64, err error) {
  	if f.isClosed {
  		return 0, io.EOF
  	}
  
  	var abs int64
  	switch whence {
  	case 0:
  		abs = offset
  	case 1:
  		abs = int64(f.Index) + offset
  	case 2:
  		abs = int64(f.Buff.Len()) + offset
  	default:
  		return 0, errors.New("filebuffer.Seek: invalid whence")
  	}
  	if abs < 0 {
  		return 0, errors.New("filebuffer.Seek: negative position")
  	}
  	f.Index = abs
  	return abs, nil
  }
docs: // Seek implements io.Seeker https://golang.org/pkg/io/#Seeker