mirror of
https://github.com/golang/go
synced 2024-11-24 00:40:12 -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:
parent
0f0c25dccc
commit
d1324d8a7a
@ -2046,7 +2046,7 @@ It's easy to write a function to print the arguments.
|
|||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
func ArgServer() {
|
func ArgServer() {
|
||||||
for i, s := range os.Args {
|
for _, s := range os.Args {
|
||||||
fmt.Println(s)
|
fmt.Println(s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2084,7 +2084,7 @@ to have the right signature.
|
|||||||
<pre>
|
<pre>
|
||||||
// Argument server.
|
// Argument server.
|
||||||
func ArgServer(w http.ResponseWriter, req *http.Request) {
|
func ArgServer(w http.ResponseWriter, req *http.Request) {
|
||||||
for i, s := range os.Args {
|
for _, s := range os.Args {
|
||||||
fmt.Fprintln(w, s)
|
fmt.Fprintln(w, s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1984,7 +1984,7 @@ It's easy to write a function to print the arguments.
|
|||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
func ArgServer() {
|
func ArgServer() {
|
||||||
for i, s := range os.Args {
|
for _, s := range os.Args {
|
||||||
fmt.Println(s)
|
fmt.Println(s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2022,7 +2022,7 @@ to have the right signature.
|
|||||||
<pre>
|
<pre>
|
||||||
// Argument server.
|
// Argument server.
|
||||||
func ArgServer(w http.ResponseWriter, req *http.Request) {
|
func ArgServer(w http.ResponseWriter, req *http.Request) {
|
||||||
for i, s := range os.Args {
|
for _, s := range os.Args {
|
||||||
fmt.Fprintln(w, s)
|
fmt.Fprintln(w, s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user