From 931e05acdee416c4f1a2d162547243945c70670c Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Fri, 30 Mar 2012 15:00:23 +0800 Subject: [PATCH] [release-branch.go1] doc/codewalk/markov: fix syntax and broken link MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ««« backport fd037b466111 doc/codewalk/markov: fix syntax and broken link Part of issue 3424. R=golang-dev, r CC=golang-dev https://golang.org/cl/5955050 »»» --- doc/codewalk/markov.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/codewalk/markov.xml b/doc/codewalk/markov.xml index 085ead7bcf..b7b7117834 100644 --- a/doc/codewalk/markov.xml +++ b/doc/codewalk/markov.xml @@ -215,7 +215,7 @@ p[len(p)-1] = suffix To choose a suffix we use the - rand.Intn function. + rand.Intn function. It returns a random integer up to (but not including) the provided value. Passing in len(choices) 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 Here's a transcript of generating some text using the Go distribution's README file as source material:
-$ ./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
-- 2.48.1