Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Incorrect comment on NewBufferedWriter? #71

Open
@ahimelman

Description

@ahimelman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions