-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os: Inconsistent EOF error message returned by File.ReadAt on windows #5619
Labels
Comments
The error message text is OS dependent. The important fact is that, on Windows, io.EOF is not returned. package main import ( "fmt" "io" "os" ) func main() { f, err := os.Create("5619.tmp") if err != nil { fmt.Println(err) return } buf := make([]byte, 10) n, err := f.ReadAt(buf, 0) fmt.Println(n, err == io.EOF, err) } Output: Linux: 0 true EOF Windows: 0 false read 5619.tmp: Reached the end of the file. Attachments:
|
Here is a fix proposal https://golang.org/cl/9952044/. Alex Labels changed: added os-windows, packagebug. Owner changed to @alexbrainman. Status changed to Started. |
This issue was closed by revision bb6e265. Status changed to Fixed. |
Issue #6277 has been merged into this issue. |
Issue #6277 has been merged into this issue. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: