GOPATH error in windows "GOPATH entry is relative; must be absolute path: "

Viewed 23094

I am new to GO and getting an error when initializing GOPATH in windows. In my project folder is

C:\Users\kamin\Documents\pm-manager

and i am try to set path in environment variable (GOPATH)but it is getting an error go: GOPATH entry is relative; must be absolute path: ":/cygdrive/c/Users/kamin/Documents/pm-manager\r\r". Run 'go help gopath' for usage.

5 Answers

I encountered the same problem. My go version is go1.9.1 windows/amd64. However I fixed the problem by deleting the simucolon end of the GOPATH. enter image description here

As alternative you can set it to %USERPROFILE%\ under Windows 10

Related