google/gvisor

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

Open

#6 024 ouverte le 19 mai 2021

Voir sur GitHub
 (6 commentaires) (0 réactions) (0 assignés)Go (1 061 forks)batch import
area: networkinggood first issuetype: bug

Métriques du dépôt

Stars
 (12 713 stars)
Métriques de merge PR
 (Merge moyen 4j 22h) (184 PRs mergées en 30 j)

Description

The doc says

	// 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.

Guide contributeur