⚒️ How To Setup GOPATH
Author:Kiyora
Count:114 Character
Reading time:1 Minute
GOPATH
is an environment variable used in Go (Golang) programming to specify the workspace directory for Go projects. It defines the root of your Go workspace, which contains the source code for your projects, as well as the compiled binaries and other related files.
Windows (GOPATH)
- Open a command prompt by pressing
win + r
the enter cmd - type at cmd
bash
set GOPATH=c:\Projects
Linux (GOPATH)
- Open a terminal by pressing
ctrl + alt + t
- type at terminal
bash
export GOPATH=$HOME/Projects
Mac (GOPATH)
- Open a terminal by pressing
command + space
then type terminal - type at terminal
bash
export GOPATH=$HOME/Projects