1
0
mirror of https://github.com/golang/go synced 2024-11-26 15:36:59 -07:00
go/api/next/45899.txt
hopehook dc8e2a6a8e io: add OffsetWriter, NewOffsetWriter
Offsetwriter refers to the design of SectionReader and removes
the section parameter n.

Since the size of the written data is determined by the user,
we cannot know where the end offset of the original data is.
The offset of SeekEnd is not valid in Seek method.

Fixes #45899.

Change-Id: I9d9445aecfa0dd4fc5168f2f65e1e3055c201b45
Reviewed-on: https://go-review.googlesource.com/c/go/+/406776
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2022-08-19 17:03:55 +00:00

5 lines
317 B
Plaintext

pkg io, type OffsetWriter struct #45899
pkg io, func NewOffsetWriter(WriterAt, int64) *OffsetWriter #45899
pkg io, method (*OffsetWriter) Write([]uint8) (int, error) #45899
pkg io, method (*OffsetWriter) WriteAt([]uint8, int64) (int, error) #45899
pkg io, method (*OffsetWriter) Seek(int64, int) (int64, error) #45899