In Go, :=
is for declaration + assignment, whereas =
is for assignment only.
For example, var foo int = 10
is the same as foo := 10
.
In Go, :=
is for declaration + assignment, whereas =
is for assignment only.
For example, var foo int = 10
is the same as foo := 10
.