Go Operations TO DELETE: Difference between revisions
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
The import path can be used by Go tooling to determine where the code is on the network. | The import path can be used by Go tooling to determine where the code is on the network. | ||
For an import statement similar to: | |||
<pre> | |||
import "github.com/something/somethingelse" | |||
</pre> | |||
<tt>go build</tt> will first search the local directories listed in GOPATH. If the package is found, the search stops. However, if using <tt>go get</tt>, the package (and its dependencies) is recursively fetched and placed in GOPATH. | |||
=Portability= | =Portability= |
Revision as of 06:04, 4 April 2016
Internal
Subjects
Remote Imports
Go has build in support for fetching source code from remote repositories.
The import path can be used by Go tooling to determine where the code is on the network.
For an import statement similar to:
import "github.com/something/somethingelse"
go build will first search the local directories listed in GOPATH. If the package is found, the search stops. However, if using go get, the package (and its dependencies) is recursively fetched and placed in GOPATH.