Fix a few small typos.

This commit is contained in:
Steve Krulewitz 2015-02-21 22:43:58 -08:00
parent 6494e4478b
commit 684013f5e0
7 changed files with 7 additions and 7 deletions

View File

@ -39,7 +39,7 @@ func main() {
// Here we'll just dump out the parsed options and // Here we'll just dump out the parsed options and
// any trailing positional arguments. Note that we // any trailing positional arguments. Note that we
// need to dereference the points with e.g. `*wordPtr` // need to dereference the pointers with e.g. `*wordPtr`
// to get the actual option values. // to get the actual option values.
fmt.Println("word:", *wordPtr) fmt.Println("word:", *wordPtr)
fmt.Println("numb:", *numbPtr) fmt.Println("numb:", *numbPtr)

View File

@ -1,5 +1,5 @@
# Running the program shows that we pick up the value # Running the program shows that we pick up the value
# value for `FOO` that we set in the program, but that # for `FOO` that we set in the program, but that
# `BAR` is empty. # `BAR` is empty.
$ go run environment-variables.go $ go run environment-variables.go
FOO: 1 FOO: 1

View File

@ -36,7 +36,7 @@ func main() {
// environment. // environment.
env := os.Environ() env := os.Environ()
// Here's the actual `os.Exec` call. If this call is // Here's the actual `syscall.Exec` call. If this call is
// successful, the execution of our process will end // successful, the execution of our process will end
// here and be replaced by the `/bin/ls -a -l -h` // here and be replaced by the `/bin/ls -a -l -h`
// process. If there is an error we'll get a return // process. If there is an error we'll get a return

View File

@ -32,4 +32,4 @@ func main() {
} }
// Note that you don't need parentheses around conditions // Note that you don't need parentheses around conditions
// in Go, but that the brackets are required. // in Go, but that the braces are required.

View File

@ -26,7 +26,7 @@ func main() {
// This finds the match for the regexp. // This finds the match for the regexp.
fmt.Println(r.FindString("peach punch")) fmt.Println(r.FindString("peach punch"))
// The also finds the first match but returns the // This also finds the first match but returns the
// start and end indexes for the match instead of the // start and end indexes for the match instead of the
// matching text. // matching text.
fmt.Println(r.FindStringIndex("peach punch")) fmt.Println(r.FindStringIndex("peach punch"))

View File

@ -63,7 +63,7 @@ func main() {
// To double-quote strings as in Go source, use `%q`. // To double-quote strings as in Go source, use `%q`.
fmt.Printf("%q\n", "\"string\"") fmt.Printf("%q\n", "\"string\"")
// As with integers as seen earlier, `%x` renders // As with integers seen earlier, `%x` renders
// the string in base-16, with two output characters // the string in base-16, with two output characters
// per byte of input. // per byte of input.
fmt.Printf("%x\n", "hex this") fmt.Printf("%x\n", "hex this")

View File

@ -21,7 +21,7 @@ func main() {
"2012-11-01T22:08:41+00:00") "2012-11-01T22:08:41+00:00")
p(t1) p(t1)
// `Format` and `Parse` uses example-based layouts. Usually // `Format` and `Parse` use example-based layouts. Usually
// you'll use a constant from `time` for these layouts, but // you'll use a constant from `time` for these layouts, but
// you can also supply custom layouts. Layouts must use the // you can also supply custom layouts. Layouts must use the
// reference time `Mon Jan 2 15:04:05 MST 2006` to show the // reference time `Mon Jan 2 15:04:05 MST 2006` to show the