hi , my go main directory is placed in
which contains all golang main files ,
my source files are in
i also added
, now when i type
, and there is no /go file in this path , so how can i change it ? and what is GOPATH ?
thank you for your support
GOPATH is the root of your go workspace.
It defaults to
~/go, but you can set the environment variable
GOPATH to override the default.
How to set an environment variable depends on your operating system.
It looks as if you were using linux, so it should usually be enough to have
export GOPATH=… in your shells RC file.
You usually do not want to set this system wide, but only for the current user, so
/etc/environment is not a good place.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.