Home  >  Article  >  Backend Development  >  Do you need a separate $GOPATH between Windows and WSL?

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

王林
王林forward
2024-02-06 10:09:031173browse

您需要在 Windows 和 WSL 之间使用单独的 $GOPATH 吗?

Question content

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

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

sorry.


Correct Answer


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

(Forget that GOPATH exists and stop reading stuff that still talks about GOPATH.)

The above is the detailed content of Do you need a separate $GOPATH between Windows and WSL?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:stackoverflow.com. If there is any infringement, please contact admin@php.cn delete