Skip to content

proposal: io: pass WriterTo through Pipe #73312

@hanwen-flow

Description

@hanwen-flow

Proposal Details

It seems that io.PipeReader could implement WriterTo, such that connecting two files using a io.Pipe (a pattern common inside docker and friends) would use copy_file_range.

I coded up a prototype in https://go-review.googlesource.com/c/go/+/664395. This would add PipeReader.WriteTo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions