Installing packages locally with go get

suggest change

In order to import a package in your program you must first download the package locally.

go get -u downloads package files from

-u means update i.e. if the package is already downloaded locally, it’ll be updated to latest version.

The code will be downloaded into $GOPATH/src/ i.e. package import path is also a name of directory where the package files are stored locally.

Import path is appended to $GOPATH/src.

Most of the time import path is also the location of source files but go get also allows for redirects via meta-data embedded in HTML files.

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents