diff options
author | Shenghou Ma <minux.ma@gmail.com> | 2012-03-30 15:00:23 +0800 |
---|---|---|
committer | Shenghou Ma <minux.ma@gmail.com> | 2012-03-30 15:00:23 +0800 |
commit | afb4f6ae01177010af6008200f09017a660f62a8 (patch) | |
tree | 156901e75bceaf4bb6ae05a3c9180e9286ff89cb /doc/codewalk | |
parent | 5e60fe5be73d871ee5c21dc0f01b2ad20680d5e3 (diff) | |
download | go-afb4f6ae01177010af6008200f09017a660f62a8.tar.gz |
doc/codewalk/markov: fix syntax and broken link
Part of issue 3424.
R=golang-dev, r
CC=golang-dev
http://codereview.appspot.com/5955050
Diffstat (limited to 'doc/codewalk')
-rw-r--r-- | doc/codewalk/markov.xml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/codewalk/markov.xml b/doc/codewalk/markov.xml index 085ead7bc..b7b711783 100644 --- a/doc/codewalk/markov.xml +++ b/doc/codewalk/markov.xml @@ -215,7 +215,7 @@ p[len(p)-1] = suffix <step title="Choosing a suffix at random" src="doc/codewalk/markov.go:/next := choices/,/Shift/"> To choose a suffix we use the - <code><a href="/pkg/rand/#Intn">rand.Intn</a></code> function. + <code><a href="/pkg/math/rand/#Intn">rand.Intn</a></code> function. It returns a random integer up to (but not including) the provided value. Passing in <code>len(choices)</code> gives us a random index into the full length of the list. @@ -287,11 +287,11 @@ a plan a man a plan a canal panama</pre> Here's a transcript of generating some text using the Go distribution's README file as source material: <pre> -$ ./markov -words=10 < $GOROOT/go/README +$ ./markov -words=10 < $GOROOT/README This is the source code repository for the Go source -$ ./markov -prefix=1 -words=10 < $GOROOT/go/README +$ ./markov -prefix=1 -words=10 < $GOROOT/README This is the go directory (the one containing this README). -$ ./markov -prefix=1 -words=10 < $GOROOT/go/README +$ ./markov -prefix=1 -words=10 < $GOROOT/README This is the variable if you have just untarred a</pre> </step> |