diff options
author | Rob Pike <r@golang.org> | 2013-10-10 17:26:03 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2013-10-10 17:26:03 -0700 |
commit | beca0e124d113fa004b8f559c725c704bab2a89a (patch) | |
tree | 98f7e5172b839c771234dfc7795914e1060b6143 | |
parent | b6c0c4228d62406fbe24c4357410813715fdb75d (diff) | |
download | go-beca0e124d113fa004b8f559c725c704bab2a89a.tar.gz go-beca0e124d113fa004b8f559c725c704bab2a89a.zip |
doc/effective_go.html: fix a couple of cosmetic issues
At the moment, godoc expands the example in the link, but in
the past it has not. Add a waffle word to allow either possibility.
Also change the order of cases in the switch in Compare to
be consistent with the other switch in the function.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/14439055
-rw-r--r-- | doc/effective_go.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/effective_go.html b/doc/effective_go.html index 7eceac5d82..9d002c5043 100644 --- a/doc/effective_go.html +++ b/doc/effective_go.html @@ -44,8 +44,8 @@ use the language. Moreover, many of the packages contain working, self-contained executable examples you can run directly from the <a href="http://golang.org">golang.org</a> web site, such as -<a href="http://golang.org/pkg/strings/#example_Map">this one</a> (click -on the word "Example" to open it up). +<a href="http://golang.org/pkg/strings/#example_Map">this one</a> (if +necessary, click on the word "Example" to open it up). If you have a question about how to approach a problem or how something might be implemented, the documentation, code and examples in the library can provide answers, ideas and @@ -839,10 +839,10 @@ func Compare(a, b []byte) int { } } switch { - case len(a) < len(b): - return -1 case len(a) > len(b): return 1 + case len(a) < len(b): + return -1 } return 0 } |