Skip to content

proposal: Go 2: io: Let MultiWriter return a WriteCloser #28480

Closed
@michael-schaller

Description

@michael-schaller

The MultiWriter in Go 1 ignores the Close part of WriteClosers. Can this be changed in Go 2 so that the returned writer is a WriteCloser which on Close checks for each given writer if it is a WriteCloser and then calls Close?

This bug is similar to issue #27617 (TeeReader & ReadCloser).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions