]> Cypherpunks repositories - gostls13.git/commitdiff
strings: make Count example show results
authorRobert Griesemer <gri@golang.org>
Mon, 27 Feb 2012 20:22:10 +0000 (12:22 -0800)
committerRobert Griesemer <gri@golang.org>
Mon, 27 Feb 2012 20:22:10 +0000 (12:22 -0800)
Thanks to dr.volker.dobler for tracking this down.

Filed a long-term issue (3142) which may eventually
resolve this problem w/o the need for a manual fix.

R=iant
CC=golang-dev
https://golang.org/cl/5698078

src/pkg/strings/example_test.go

index 0b583411331a0be0e92c1e77ee2625356d13a320..daeb85ef6bbf2878d6dc803072999451fcf0ea8f 100644 (file)
@@ -41,6 +41,7 @@ func ExampleContainsAny() {
 func ExampleCount() {
        fmt.Println(strings.Count("cheese", "e"))
        fmt.Println(strings.Count("five", "")) // before & after each rune
+
        // Output:
        // 3
        // 5