diff options
author | Andrew Gerrand <adg@golang.org> | 2011-10-05 13:29:59 -0700 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2011-10-05 13:29:59 -0700 |
commit | 768460f39a8c9736c82dfb04a4e355ccf0db5656 (patch) | |
tree | 5b0413790ede3e520c1f6e132ac7c308653b50a9 | |
parent | 3ee62084376f86f61be3612f48d544f21d19304a (diff) | |
download | go-768460f39a8c9736c82dfb04a4e355ccf0db5656.tar.gz |
[release-branch.r60] doc: update tutorial.
??? CL 5175052 / e144a6dec55e
doc: update tutorial.
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
http://codereview.appspot.com/5175052
???
R=dsymonds
CC=golang-dev
http://codereview.appspot.com/5199042
-rw-r--r-- | doc/go_tutorial.html | 5 | ||||
-rw-r--r-- | doc/go_tutorial.tmpl | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/doc/go_tutorial.html b/doc/go_tutorial.html index 0b366bb2b..8f6e07b06 100644 --- a/doc/go_tutorial.html +++ b/doc/go_tutorial.html @@ -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, "/dev/stdin") Stdout = newFile(syscall.Stdout, "/dev/stdout") Stderr = newFile(syscall.Stderr, "/dev/stderr") ) - </pre> <p> The <code>newFile</code> function was not exported because it's internal. The proper, diff --git a/doc/go_tutorial.tmpl b/doc/go_tutorial.tmpl index c170c25aa..15f87ca4b 100644 --- a/doc/go_tutorial.tmpl +++ b/doc/go_tutorial.tmpl @@ -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): |