GOPATH Environment Variable

visibility 53 access_time 5 months ago languageEnglish

GOPATH environment variable (%GOPATH%, $GOPATH) will be created after you install Go on your computer. 

What is it for?

This environment variable is used to find Go workspaces which contains binaries, packages, etc. For example, once 

The default location is %USERPROFILE%/go on Windows or $HOME/go on Linux. Basically it locates in a subfolder named go under your user home folder.

Change it to other directory

Windows

To change it on Windows machine, go to Edit the system environment variable ->  Environment Variables:

Click GOPATH variable and then edit the value:

Click OK button to save the changes.

Linux

To change it on UNIX-alike systems, edit .bashrc or .profile file. 


copyright This page is subject to Site terms.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

timeline Stats
Page index 0.36
More from Kontext
Go: Access Data in SQLite
visibility 117
thumb_up 1
access_time 5 months ago
Go: Access Data in SQLite