Skip to content

Commit e3b6188

Browse files
committed
tutorial: a couple of minor fixes.
Fixes #1333. R=rsc, gri CC=golang-dev https://golang.org/cl/3556041
1 parent 27f2d5c commit e3b6188

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

doc/go_tutorial.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,8 @@ <h2>An I/O Package</h2>
649649
13 func main() {
650650
14 hello := []byte(&quot;hello, world\n&quot;)
651651
15 file.Stdout.Write(hello)
652-
16 file, err := file.Open(&quot;/does/not/exist&quot;, 0, 0)
653-
17 if file == nil {
652+
16 f, err := file.Open(&quot;/does/not/exist&quot;, 0, 0)
653+
17 if f == nil {
654654
18 fmt.Printf(&quot;can't open file; err=%s\n&quot;, err.String())
655655
19 os.Exit(1)
656656
20 }

doc/progs/helloworld3.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313
func main() {
1414
hello := []byte("hello, world\n")
1515
file.Stdout.Write(hello)
16-
file, err := file.Open("/does/not/exist", 0, 0)
17-
if file == nil {
16+
f, err := file.Open("/does/not/exist", 0, 0)
17+
if f == nil {
1818
fmt.Printf("can't open file; err=%s\n", err.String())
1919
os.Exit(1)
2020
}

doc/progs/sortmain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package main
66

77
import (
88
"fmt"
9-
"sort"
9+
"./sort"
1010
)
1111

1212
func ints() {

0 commit comments

Comments
 (0)