]> Cypherpunks repositories - gostls13.git/commitdiff
doc: update tutorial.
authorRob Pike <r@golang.org>
Mon, 3 Oct 2011 23:18:47 +0000 (16:18 -0700)
committerRob Pike <r@golang.org>
Mon, 3 Oct 2011 23:18:47 +0000 (16:18 -0700)
Fix for new regexp library ($ isn't end of line any more).
Don't assume . is in PATH.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5175052

doc/go_tutorial.html
doc/go_tutorial.tmpl

index 0b366bb2ba9e5a50bf999bed6e71b7781e4f11ea..8f6e07b06c57c6fe2e736106051a2bf26df28470 100644 (file)
@@ -95,7 +95,7 @@ Here's how to compile and run our program.  With <code>6g</code>, say,
 <pre>
 $ 6g helloworld.go  # compile; object goes into helloworld.6
 $ 6l helloworld.6   # link; output goes into 6.out
-$ 6.out
+$ ./6.out
 Hello, world; or Καλημέρα κόσμε; or こんにちは 世界
 $
 </pre>
@@ -544,13 +544,12 @@ composite literal, as is done here in the <code>return</code> statement from <co
 <p>
 We can use the factory to construct some familiar, exported variables of type <code>*File</code>:
 <p>
-<pre><!--{{code "progs/file.go" `/var/` `/^.$/`}}
+<pre><!--{{code "progs/file.go" `/var/` `/^\)/`}}
 -->var (
     Stdin  = newFile(syscall.Stdin, &#34;/dev/stdin&#34;)
     Stdout = newFile(syscall.Stdout, &#34;/dev/stdout&#34;)
     Stderr = newFile(syscall.Stderr, &#34;/dev/stderr&#34;)
 )
-
 </pre>
 <p>
 The <code>newFile</code> function was not exported because it's internal. The proper,
index c170c25aa946fc9975606733b12af0b95b1a35cb..15f87ca4b29019ce7efb9b0bec3ff3810b62a065 100644 (file)
@@ -87,7 +87,7 @@ Here's how to compile and run our program.  With <code>6g</code>, say,
 <pre>
 $ 6g helloworld.go  # compile; object goes into helloworld.6
 $ 6l helloworld.6   # link; output goes into 6.out
-$ 6.out
+$ ./6.out
 Hello, world; or Καλημέρα κόσμε; or こんにちは 世界
 $
 </pre>
@@ -470,7 +470,7 @@ composite literal, as is done here in the <code>return</code> statement from <co
 <p>
 We can use the factory to construct some familiar, exported variables of type <code>*File</code>:
 <p>
-{{code "progs/file.go" `/var/` `/^.$/`}}
+{{code "progs/file.go" `/var/` `/^\)/`}}
 <p>
 The <code>newFile</code> function was not exported because it's internal. The proper,
 exported factory to use is <code>OpenFile</code> (we'll explain that name in a moment):