Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. // Offset is how many bytes to move
  2. // Offset can be positive or negative
  3. var offset int64 = 5
  4.  
  5. // Whence is the point of reference for offset
  6. // 0 = Beginning of file
  7. // 1 = Current position
  8. // 2 = End of file
  9. var whence int = 0
  10. newPosition, err := file.Seek(offset, whence)
  11. if err != nil {
  12. log.Fatal(err)
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement