gogopath

Do you need to use a separate $GOPATH between Windows and WSL?


I use Windows and WSL for developing Go code, but, don't know if I need to have a separate $GOPATH for Windows and WSL, or if I can use the same $GOPATH for both.

Can you use the same $GOPATH between Windows and WSL?

I am sorry.


Solution

  • Can you use the same $GOPATH between Windows and WSL?

    Yes, you even should use the same: Unset GOPATH on both.

    (Just forget that GOPATH exists and stop reading things that still talk about GOPATH.)