google/gvisor

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

Open

#6,024 创建于 2021年5月19日

在 GitHub 查看
 (6 评论) (0 反应) (0 负责人)Go (1,061 fork)batch import
area: networkinggood first issuetype: bug

仓库指标

Star
 (12,713 star)
PR 合并指标
 (平均合并 4天 22小时) (30 天内合并 184 个 PR)

描述

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.

贡献者指南