aboutsummaryrefslogtreecommitdiff
path: root/src/sort/example_keys_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/sort/example_keys_test.go')
-rw-r--r--src/sort/example_keys_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sort/example_keys_test.go b/src/sort/example_keys_test.go
index a8e47e4926..648f919e68 100644
--- a/src/sort/example_keys_test.go
+++ b/src/sort/example_keys_test.go
@@ -73,7 +73,7 @@ func Example_sortKeys() {
return p1.distance < p2.distance
}
decreasingDistance := func(p1, p2 *Planet) bool {
- return !distance(p1, p2)
+ return distance(p2, p1)
}
// Sort the planets by the various criteria.