Skip to content

clnt.File superficially implements io.Writer #42

@aarzilli

Description

@aarzilli

io.Writer says that Write must return a non-nil error if it returns n < len(p) but clnt.(*File).Write can return n < len(buf) and nil as an error.

The effect is that using a clnt.File with something that takes an io.Writer, like io.Copy, will compile and appear to work correctly until a large write (>4kb?) is attempted, and then break.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions