summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNami-Doc <vendethiel@hotmail.fr>2014-09-22 14:14:55 +0200
committerNami-Doc <vendethiel@hotmail.fr>2014-09-22 14:14:55 +0200
commit809bc8ce4900bce21f19226a8dc90d9dc06e9fa5 (patch)
tree5c3df22780fb3cd857a8f7695df0772c39a49f89
parent41c3d0329a8149340a0703209ba948e45135e239 (diff)
parent5e5a7a19feb42afad6b678cc970db2ea248fcc9b (diff)
Merge pull request #784 from kb1/master
[go] Fix no new variables on left side of :=
-rw-r--r--go.html.markdown4
1 files changed, 2 insertions, 2 deletions
diff --git a/go.html.markdown b/go.html.markdown
index b4c6afff..17f10bd9 100644
--- a/go.html.markdown
+++ b/go.html.markdown
@@ -72,7 +72,7 @@ func learnMultiple(x, y int) (sum, prod int) {
// Some built-in types and literals.
func learnTypes() {
// Short declaration usually gives you what you want.
- s := "Learn Go!" // string type.
+ str := "Learn Go!" // string type.
s2 := `A "raw" string literal
can include line breaks.` // Same string type.
@@ -126,7 +126,7 @@ can include line breaks.` // Same string type.
// Unused variables are an error in Go.
// The underbar lets you "use" a variable but discard its value.
- _, _, _, _, _, _, _, _, _ = s2, g, f, u, pi, n, a3, s4, bs
+ _, _, _, _, _, _, _, _, _, _ = str, s2, g, f, u, pi, n, a3, s4, bs
// Output of course counts as using a variable.
fmt.Println(s, c, a4, s3, d2, m)