]> Cypherpunks repositories - gostls13.git/commit
io: simplify Examples
authorEric <eric@tnz.fr>
Mon, 13 Apr 2020 21:28:47 +0000 (21:28 +0000)
committerIan Lance Taylor <iant@golang.org>
Mon, 13 Apr 2020 22:48:16 +0000 (22:48 +0000)
commit240eac38e1be22d8dfaf96731c337afa479248ff
tree7063931cb27d7fee52f6d8c58a15dd80f29dab03
parentca017a6fb9b46860ab0b5054ca07feea3d711a36
io: simplify Examples

- CopyN: 5 creates ambiguity with respect to whitespace and upperbound
- TeeReader less boilerplate and displays a common usage of it
- SectionReader_* all sections unified to 5:17 for clarity
- SectionReader_Seek uses io.Copy to stdout like other examples
- Seeker_Seek remove useless prints
- Pipe print reader like other examples

Updates #36417

Change-Id: Ibd01761d5a5786cdb1ea934f7a98f8302430c8a5
GitHub-Last-Rev: 4c17f9a8e32d89743b7eaec7c52032256972cc0a
GitHub-Pull-Request: golang/go#38379
Reviewed-on: https://go-review.googlesource.com/c/go/+/227868
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/io/example_test.go