I've just installed Go from the package on the golang site.
When trying to build (or run) import getting an import error, but can't figure out why:
go build world2.go
This produces the error:
# world2.go:3:8: import "world": cannot find package
Running "go env" produces:
GOROOT="/usr/local/go" GOBIN="/usr/local/go/bin" GOARCH="amd64" GOCHAR="6" GOOS="darwin" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread -fno-common" CGO_ENABLED="1"
This is what my file structure looks like (ala tree):
. ├── world.go └── world2.go
Any tips what I'm doing wrong or next steps?
@aa-software2112 things have evolved since this discussion but I am happy my 7 year old comments have a net positive. Please read up on modules and vendoring and message me if you think I can help in any way.