google/gvisor

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

オープン

#6,024 opened on 2021/05/19

 (6 件のコメント) (0 件のリアクション) (0 人の担当者)Go (1,061 件のフォーク)batch import
area: networkinggood first issuetype: bug

Repository metrics

Stars
 (12,713 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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.

コントリビューターガイド