I'm getting started with golang, just recording my initial hiccups and the solutions.
cannot refer to unexported name fmt.printf
hello/hello.go:6: undefined: fmt.printf
Golang is case sensitive , hence the function is fmt.Printf , with a capital P.
In Go, a name is exported if it begins with a capital letter. For example,
In Go, a name is exported if it begins with a capital letter. For example,
Pizza
is an exported name, as is Pi
, which is exported from the math
package.
The p in println needs to be capitalized.
ReplyDelete