For example,
func (f *File) Seek(offset int64, whence int) (ret int64, err error)
Seek
sets theoffset
for the nextRead
orWrite
on file tooffset
, interpreted according towhence
: 0 means relative to the origin of the file, 1 means relative to the current offset, and 2 means relative to the end. It returns the new offset and an error, if any.