We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please answer these questions before submitting your issue. Thanks!
go version
1.7.3
go env
GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin"
fileSink, err := os.OpenFile("./text.txt", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0655) if err != nil { return } csv := csv.NewWriter(fileSink) csv.Write([]string{"haha"}) csv.Flush() //fileSink.Sync() time.Sleep(time.Minute)
After csv.Flush, the file doesn't Sync.
Shouldn't sync after csv.Flush?
The text was updated successfully, but these errors were encountered:
Flush only does as is documented:
Flush writes any buffered data to the underlying io.Writer.
If you want to do something else to your *os.File, that's your job.
*os.File
For questions about Go, see https://golang.org/wiki/Questions.
Sorry, something went wrong.
@bradfitz thanks for your response!
No branches or pull requests
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.7.3
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
What did you do?
After csv.Flush, the file doesn't Sync.
Shouldn't sync after csv.Flush?
The text was updated successfully, but these errors were encountered: