]> Cypherpunks repositories - gostls13.git/commitdiff
sort: use proper mass unit in example
authorVolker Dobler <dr.volker.dobler@gmail.com>
Wed, 27 Feb 2013 18:44:50 +0000 (10:44 -0800)
committerRob Pike <r@golang.org>
Wed, 27 Feb 2013 18:44:50 +0000 (10:44 -0800)
The values for the planet masses are given in
earth mass, not solar mass.

R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/7368054

src/pkg/sort/example_keys_test.go

index 268e4daaf8bd314db9da36a87370c422cab6b5bd..a8e47e4926b64742fc74fceb2b7b995b83b525b6 100644 (file)
@@ -10,13 +10,13 @@ import (
 )
 
 // A couple of type definitions to make the units clear.
-type solarMass float64
+type earthMass float64
 type au float64
 
 // A Planet defines the properties of a solar system object.
 type Planet struct {
        name     string
-       mass     solarMass
+       mass     earthMass
        distance au
 }