Skip to content
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

Incorrect comment on NewBufferedWriter? #71

Open
ahimelman opened this issue Mar 14, 2023 · 0 comments
Open

Incorrect comment on NewBufferedWriter? #71

ahimelman opened this issue Mar 14, 2023 · 0 comments

Comments

@ahimelman
Copy link

The comment (and docs) to NewBufferedWriter state that "Users must call Close to guarantee all data has been forwarded to the underlying io.Writer":

// The Writer returned buffers writes. Users must call Close to guarantee all

However, in looking at the Flush/Close implementations, and their usages in tests, it seems that users only need to call Flush, not Close, which would allow a caller to continue using the buffered writer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant