Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Offset is how many bytes to move
- // Offset can be positive or negative
- var offset int64 = 5
- // Whence is the point of reference for offset
- // 0 = Beginning of file
- // 1 = Current position
- // 2 = End of file
- var whence int = 0
- newPosition, err := file.Seek(offset, whence)
- if err != nil {
- log.Fatal(err)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement