diff options
| author | Russ Cox <rsc@golang.org> | 2017-11-13 21:21:59 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2017-11-15 21:25:13 +0000 |
| commit | e7628bee6e8ddac41b213d9ed0b2d6e4051674e4 (patch) | |
| tree | 89b1a600711481342927837d6e6fc82fb51fe0cb | |
| parent | 22671e734473d3cd088958a00826c1adf936032c (diff) | |
| download | go-e7628bee6e8ddac41b213d9ed0b2d6e4051674e4.tar.xz | |
bytes: make ExampleTrimLeft and ExampleTrimRight match
ExampleTrimLeft was inexplicably complex.
Change-Id: I13ca81bdeba728bdd632acf82e3a1101d29b9f39
Reviewed-on: https://go-review.googlesource.com/78111
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
| -rw-r--r-- | src/bytes/example_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bytes/example_test.go b/src/bytes/example_test.go index 9921a207b1..00e39cadcb 100644 --- a/src/bytes/example_test.go +++ b/src/bytes/example_test.go @@ -383,9 +383,9 @@ func ExampleMap() { } func ExampleTrimLeft() { - fmt.Print(string(bytes.TrimLeft([]byte("+ 005400"), "+0 "))) + fmt.Print(string(bytes.TrimLeft([]byte("453gopher8257"), "0123456789"))) // Output: - // 5400 + // gopher8257 } func ExampleTrimLeftFunc() { |
