From: Russ Cox Date: Tue, 14 Nov 2017 02:21:59 +0000 (-0500) Subject: bytes: make ExampleTrimLeft and ExampleTrimRight match X-Git-Tag: go1.10beta1~262 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e7628bee6e8ddac41b213d9ed0b2d6e4051674e4;p=gostls13.git 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 Reviewed-by: Joe Tsai --- 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() {