Merge remote-tracking branches 'nikai3d/patch-4', 'nikai3d/patch-5', 'nikai3d/patch-6' and 'nikai3d/patch-7'

This commit is contained in:
Mark McGranaghan 2012-11-24 11:40:47 -08:00
4 changed files with 5 additions and 5 deletions

View File

@ -17,7 +17,7 @@ import "os/exec"
func main() {
// For our example we'll exec `ls`. Go requires an
// abolute path to the binary we want to execute, so
// absolute path to the binary we want to execute, so
// we'll use `exec.LookPath` to find it (probably
// `/bin/ls`).
binary, lookErr := exec.LookPath("ls")
@ -36,7 +36,7 @@ func main() {
env := os.Environ()
// Here's the actual `os.Exec` call. If this call is
// succesful, 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`
// process. If there is an error we'll get a return
// value.

View File

@ -29,7 +29,7 @@ func main() {
}
// `range` on map iterates over key/value pairs.
kvs := map[string]string{"a": "apple", "b": "bannana"}
kvs := map[string]string{"a": "apple", "b": "banana"}
for k, v := range kvs {
fmt.Printf("%s -> %s\n", k, v)
}

View File

@ -67,7 +67,7 @@ func main() {
check(err)
// The `bufio` package implements a buffered
// reader that may be useful both for it's efficiency
// reader that may be useful both for its efficiency
// with many small reads and because of the additional
// reading methods it provides.
r4 := bufio.NewReader(f)

View File

@ -18,7 +18,7 @@ type ByLength []string
// We implement `sort.Interface` - `Len`, `Less`, and
// `Swap` - on our type so we can use the `sort` package's
// generic `Sort` function. `Len` and `Swap`
// will usually be similar accross types and `Less` will
// will usually be similar across types and `Less` will
// hold the actual custom sorting logic. In our case we
// want to sort in order of increasing string length, so
// we use `len(s[i])` and `len(s[j])` here.