3 ms·
> For Windows it allows you to share the directory between the WSL and Windows I've avoided changing the GOPATH by using the following set up: C:/Users/<user>
by alexkavon 8y ago
> For Windows it allows you to share the directory between the WSL and Windows
I've avoided changing the GOPATH by using the following set up:
C:/Users/<user>/go
(Standard windows GOPATH)
Then symlink in WSL:
ln -s /mnt/c/Users/<user>/go ~/go
Works pretty well. Then you can install Go on Windows if you need it, otherwise your dev environment is isolated and your Go code remains on Windows if you remove/refresh WSL. Also if you use file history, the code will be backed up this way in your Windows home as well.