Have a look at these two simple packages:
package m
const β = 1
package main
import ("m";"fmt")
func main() {
fmt.Println(m.β)
}
I get this error when I try to compile them:
$ GOPATH=`pwd` go run a.go
# command-line-arguments
./a.go:4: cannot refer to unexported name m.β
./a.go:4: undefined: m.β
Why? I tried replacing the β with B in both packages, and it works, but I'm trying to use the proper symbol here. Maybe both packages are using homoglyphs or different encodings for some reason?