Change example text in variables.go
Instead of 'short', which is a common programming language keyword, use something random like 'apple'. This way it prevents confusion from people learning explicit variable declaration, and thinking the type is a short instead of a string.
This commit is contained in:
parent
ec54a84b0c
commit
3f4d78ef6d
@ -28,7 +28,7 @@ func main() {
|
||||
|
||||
// The `:=` syntax is shorthand for declaring and
|
||||
// initializing a variable, e.g. for
|
||||
// `var f string = "short"` in this case.
|
||||
f := "short"
|
||||
// `var f string = "apple"` in this case.
|
||||
f := "apple"
|
||||
fmt.Println(f)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user