For the Go tools to work consistently, your code has to be inside GOPATH, which means you cannot ignore it entirely.
You can often use relative package names (e.g. "go test ./..."), but it breaks whenever you use absolute ones, and the Go toolchain is based on this assumption being true. My experience is that editor plugins (e.g.
the Go plugin for VSCode) don't like this.
I use hardlinks (the "hln" third-party utility on macOS) to get around this, which means I can have all my projects under a sane directory structure under ~/Projects.