]> Cypherpunks repositories - gostls13.git/commit
io: add OffsetWriter, NewOffsetWriter
authorhopehook <hopehook.com@gmail.com>
Tue, 17 May 2022 03:24:03 +0000 (11:24 +0800)
committerGopher Robot <gobot@golang.org>
Fri, 19 Aug 2022 17:03:55 +0000 (17:03 +0000)
commitdc8e2a6a8ec94f2c98ba20edd57932eba284efb1
tree0fbaf5a2ca23b9069f40b41f9eb73d503ed5a9bd
parent7dad1d24b2e596b2178c1f94fe877c9effa330cd
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>
api/next/45899.txt [new file with mode: 0644]
src/io/export_test.go
src/io/io.go
src/io/io_test.go