summaryrefslogtreecommitdiff
path: root/doc/codewalk
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-03-26 16:50:58 +0200
committerOndřej Surý <ondrej@sury.org>2012-03-26 16:50:58 +0200
commit519725bb3c075ee2462c929f5997cb068e18466a (patch)
tree5b162e8488ad147a645048c073577821b4a2bee9 /doc/codewalk
parent842623c5dd2819d980ca9c58048d6bc6ed82475f (diff)
downloadgolang-upstream-weekly/2012.03.22.tar.gz
Imported Upstream version 2012.03.22upstream-weekly/2012.03.22
Diffstat (limited to 'doc/codewalk')
-rw-r--r--doc/codewalk/markov.xml15
1 files changed, 7 insertions, 8 deletions
diff --git a/doc/codewalk/markov.xml b/doc/codewalk/markov.xml
index 81df1289c..085ead7bc 100644
--- a/doc/codewalk/markov.xml
+++ b/doc/codewalk/markov.xml
@@ -155,7 +155,7 @@ Prefix Map key
<br/><br/>
For more information about the <code>append</code> function and slices
in general see the
- <a href="http://blog.golang.org/2011/01/go-slices-usage-and-internals.html">Slices: usage and internals</a> article.
+ <a href="/doc/articles/slices_usage_and_internals.html">Slices: usage and internals</a> article.
</step>
<step title="Pushing the suffix onto the prefix" src="doc/codewalk/markov.go:/p\.Shift/">
@@ -275,16 +275,15 @@ p[len(p)-1] = suffix
</step>
<step title="Using this program" src="doc/codewalk/markov.go">
- To use this program, first compile and link it.
- If you are using <code>6g</code> as your compiler, the command
- would look something like this:
+ To use this program, first build it with the
+ <a href="/cmd/go/">go</a> command:
<pre>
-$ 6g markov.go &amp;&amp; 6l -o markov markov.6</pre>
+$ go build markov.go</pre>
And then execute it while piping in some input text:
<pre>
-$ echo "a man a plan a canal panama" | ./markov -prefix=1
-a plan a man a plan a canal panama
- </pre>
+$ echo "a man a plan a canal panama" \
+ | ./markov -prefix=1
+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>