You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the planet sorter example, on line 38, the By type is defined but not used:
http://tip.golang.org/src/pkg/sort/example_keys_test.go#L38
Replace:
by func(p1, p2 *Planet) bool // Closure used in the Less method.
with:
by By // Closure used in the Less method.
The text was updated successfully, but these errors were encountered:
Apart from less keystrokes, I agree, there is no very compelling reason to do so :-)
It was pleasant to see an example of function literals and type conversions in this bit
of code; it is a slightly under documented aspect of Go, apart from:
http://golang.org/doc/codewalk/functions/
Maybe a blog post on the subject would be good?
The text was updated successfully, but these errors were encountered: