Commit d1324d8a authored by Rob Pike's avatar Rob Pike

effective_go: remove unused variable from a couple of examples

Fixes #2481.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5435068
parent 0f0c25dc
......@@ -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)
}
}
......
......@@ -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)
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment