diff options
Diffstat (limited to 'doc/effective_go.html')
-rw-r--r-- | doc/effective_go.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/effective_go.html b/doc/effective_go.html index 2d6403d0d..2c82ac91b 100644 --- a/doc/effective_go.html +++ b/doc/effective_go.html @@ -977,14 +977,14 @@ you can pass a pointer to the array. <pre> func Sum(a *[3]float) (sum float) { - for _, v := range a { + for _, v := range *a { sum += v } return } array := [...]float{7.0, 8.5, 9.1}; -x := sum(&array); // Note the explicit address-of operator +x := Sum(&array); // Note the explicit address-of operator </pre> <p> |