I am a go newbie. I am trying to install gomobile for evaluation on MacOS BigSur but can't get past the init
step.
running go version
returns go version go1.17.6 darwin/amd64
Following the directions, the gomobile
install appears to work properly (after explicitly adding gomobile
to my PATH), but running init
or version
fails.
gomobile: go install golang.org/x/mobile/cmd/gobind failed: exit status 1
go install: version is required when current directory is not in a module
Try 'go install golang.org/x/mobile/cmd/gobind@latest' to install the latest version
gomobile version unknown: cannot test gomobile binary: exit status 1, no required module provides package golang.org/x/mobile/cmd/gomobile: go.mod file not found in current directory or any parent directory; see 'go help modules'
I'm guessing this has something to do with environment variables but any suggestions and/or help would be appreciated.