google / google/gvisor

tcpip.Endpoint.Write() doc is out of date

Open
#6,024 6 comments 0 reactions 0 assignees View on GitHub
area: networking good first issue type: bug
Dominant language
Go
Stars
19.3k
Forks
2k
Avg merge
3d 5h
Merged PRs (30d)
264

Description

The doc says
```go
// Unlike io.Writer.Write, Endpoint.Write transfers ownership of any bytes
// successfully written to the Endpoint. That is, if a call to
// Write(SlicePayload{data}) returns (n, err), it may retain data[:n], and
// the caller should not use data[:n] after Write returns.
```
but the signature of `Write` has since changed. It no longer accepts a slice payload, so this advice is no longer applicable.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.