Hacker News new | ask | show | jobs
by hgl 3196 days ago
You can work around the GOPATH issue by using Docker. If you build go within a Docker container, you can structure the folder however you like and it won't affect the host.

The only downside is that your text editor might stop offering some features when editing a go file, since the import paths might not point to the actual location.

2 comments

I don't think you have to go that far. I think something like https://direnv.net/ should work too. Although, I do agree that having this restriction in the first place is bizarre.
The only downside being well having to use docker to work in a modern language