1
0
mirror of https://github.com/golang/go synced 2024-11-21 15:24:45 -07:00

doc: various updates to doc/code.html

R=golang-dev, adg, r
CC=golang-dev
https://golang.org/cl/5649068
This commit is contained in:
Shenghou Ma 2012-02-18 16:13:02 +11:00 committed by Rob Pike
parent 701fb580bd
commit f18b0b0c16

View File

@ -109,7 +109,7 @@ package foo
const String = "Go rules!" const String = "Go rules!"
^D ^D
$ go install widgets/foo $ go install widgets/foo
$ ls $GOPATH/pkg/*/example $ ls $GOPATH/pkg/*/widgets
foo.a foo.a
</pre> </pre>
@ -162,6 +162,7 @@ Use "<code>go install</code>":
</p> </p>
<pre> <pre>
$ mkdir -p $GOPATH/src/widgets/bar
$ cat &gt; $GOPATH/src/widgets/bar/bar.go $ cat &gt; $GOPATH/src/widgets/bar/bar.go
package main package main
@ -217,7 +218,7 @@ func TestString(t *testing.T) {
} }
^D ^D
$ go test widgets/foo $ go test widgets/foo
ok widgets/foo ok widgets/foo 0.018s
</pre> </pre>
<p> <p>
@ -323,8 +324,8 @@ foo_arm.go
</pre> </pre>
describes a package that builds on describes a package that builds on
different operating systems by parameterizing the file name with different architectures by parameterizing the file name with
<code>$GOOS</code>.</p> <code>$GOARCH</code>.</p>
<p>The general code goes in <code>foo.go</code>, while architecture-specific <p>The general code goes in <code>foo.go</code>, while architecture-specific
code goes in <code>foo_386.go</code>, <code>foo_amd64.go</code>, and code goes in <code>foo_386.go</code>, <code>foo_amd64.go</code>, and