Re:Go mod’s lesser known features
by arccy on Friday April 01, 2022 @04:10AM
(#30876155)
it should have been `go mod init mything/mypackage` (without the `src/`) in the `GOPATH/src/mything/mypackage` directory,
and `GOPATH=$PWD` is almost certainly wrong. The `go` command in module mode assumes independence from GOPATH, so to build something, you have to be "in" the module (under a directory with a `go.mod` file).
[ Parent
| on HN ]
Re:Go mod’s lesser known features
by CannisterFlux on Friday April 01, 2022 @06:05AM
(#30876637)
Thanks, I've been checking on project layouts, and I have mine definitely wrong / weird. Which is probably why I've made life difficult for myself.