1
0
mirror of https://github.com/golang/go synced 2024-11-12 01:50:22 -07:00

effective_go: remove unused variable from a couple of examples

Fixes #2481.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5435068
This commit is contained in:
Rob Pike 2011-11-24 08:51:47 -08:00
parent 0f0c25dccc
commit d1324d8a7a
2 changed files with 4 additions and 4 deletions

View File

@ -2046,7 +2046,7 @@ It's easy to write a function to print the arguments.
</p>
<pre>
func ArgServer() {
for i, s := range os.Args {
for _, s := range os.Args {
fmt.Println(s)
}
}
@ -2084,7 +2084,7 @@ to have the right signature.
<pre>
// Argument server.
func ArgServer(w http.ResponseWriter, req *http.Request) {
for i, s := range os.Args {
for _, s := range os.Args {
fmt.Fprintln(w, s)
}
}

View File

@ -1984,7 +1984,7 @@ It's easy to write a function to print the arguments.
</p>
<pre>
func ArgServer() {
for i, s := range os.Args {
for _, s := range os.Args {
fmt.Println(s)
}
}
@ -2022,7 +2022,7 @@ to have the right signature.
<pre>
// Argument server.
func ArgServer(w http.ResponseWriter, req *http.Request) {
for i, s := range os.Args {
for _, s := range os.Args {
fmt.Fprintln(w, s)
}
}