Merge remote-tracking branch 'oohira/fix-word-style' into fix-word-style

This commit is contained in:
Mark McGranaghan 2018-02-01 17:50:20 -05:00
commit 592243aa85
4 changed files with 5 additions and 5 deletions

View File

@ -23,7 +23,7 @@ func f1(arg int) (int, error) {
} }
// A nil value in the error position indicates that // A `nil` value in the error position indicates that
// there was no error. // there was no error.
return arg + 3, nil return arg + 3, nil
} }
@ -74,7 +74,7 @@ func main() {
} }
// If you want to programmatically use the data in // If you want to programmatically use the data in
// a custom error, you'll need to get the error as an // a custom error, you'll need to get the error as an
// instance of the custom error type via type // instance of the custom error type via type
// assertion. // assertion.
_, e := f2(42) _, e := f2(42)

View File

@ -16,7 +16,7 @@ func main() {
m["k1"] = 7 m["k1"] = 7
m["k2"] = 13 m["k2"] = 13
// Printing a map with e.g. `Println` will show all of // Printing a map with e.g. `fmt.Println` will show all of
// its key/value pairs. // its key/value pairs.
fmt.Println("map:", m) fmt.Println("map:", m)

View File

@ -30,7 +30,7 @@ func main() {
// arrays. One is the builtin `append`, which // arrays. One is the builtin `append`, which
// returns a slice containing one or more new values. // returns a slice containing one or more new values.
// Note that we need to accept a return value from // Note that we need to accept a return value from
// append as we may get a new slice value. // `append` as we may get a new slice value.
s = append(s, "d") s = append(s, "d")
s = append(s, "e", "f") s = append(s, "e", "f")
fmt.Println("apd:", s) fmt.Println("apd:", s)

View File

@ -8,7 +8,7 @@ package main
import "fmt" import "fmt"
// Here's a function that will take an arbitrary number // Here's a function that will take an arbitrary number
// of `ints` as arguments. // of `int`s as arguments.
func sum(nums ...int) { func sum(nums ...int) {
fmt.Print(nums, " ") fmt.Print(nums, " ")
total := 0 total := 0