-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
Description
The doc for ReadAt is somewhat misleading: "ReadAt reads len(b) bytes from the File starting at byte offset off. It returns the number of bytes read and the Error, if any. EOF is signaled by a zero count with err set to EOF. ReadAt always returns a non-nil Error when n != len(b)." when EOF is encountered during a read, you can have a > 0 return value and EOF. How about simply saying: "ReadAt reads len(b) bytes from the File starting at byte offset off. It returns the number of bytes read and if n != len(b) an error. End of file is signaled by the EOF error."