GOPATH entry is relative must be Absolut path ,How can solve it

1.4k Views Asked by At

enter image description here

go: GOPATH entry is relative; must be absolute path: "%Jittu%\go". For more details see: 'go help gopath

1

There are 1 best solutions below

0
blami On

Go doesn't expand Windows (or any other) environmental variables in GOPATH. You need to provide absolute path, e.g. setx GOPATH "C:\Users\Jittu\go".

If you want to use other variable to set GOPATH it must be expanded at the time of setting GOPATH so that GOPATH is always seen by Go only as absolute path.