]> Cypherpunks repositories - gostls13.git/commit
internal/saferio: avoid returning io.EOF from ReadData if data was read
authorJoe Tsai <joetsai@digital-static.net>
Fri, 19 Aug 2022 07:15:53 +0000 (00:15 -0700)
committerGopher Robot <gobot@golang.org>
Mon, 22 Aug 2022 15:01:45 +0000 (15:01 +0000)
commitfc34fdb4154ac40711209e9234639285e071daa9
tree58df01eba841e73a3b5ad1b00e42d8328b0da1ef
parent6bdca82030779e3b9032324e68a3feacb85bc9bc
internal/saferio: avoid returning io.EOF from ReadData if data was read

ReadData follows the error semantics of io.ReadFull for small sizes,
it should do so as well for large sizes.

Change-Id: I6a11b00d903ac5332e1dda074473790dcf21f32a
Reviewed-on: https://go-review.googlesource.com/c/go/+/424919
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Joseph Tsai <joetsai@digital-static.net>
Run-TryBot: Joseph Tsai <joetsai@digital-static.net>
src/internal/saferio/io.go
src/internal/saferio/io_test.go