I am certainly a GO newbie so I will apologize in advance. I am playing around with a GO app that imports martini for example. Every time I run the app, I have to run "go get github.com/codegangsta/martini". Any way to NOT have to do this? Either way, how would this work in an offline environment? I am considering GO for an app that will be offline with no internet access.
From the go documentation:
Get downloads and installs the packages named by the import paths, along with their dependencies.
To expand on that: go get
will clone the code you're requesting from the repository (in this case github.com/codegangsta/martini
) as well as any code that that code imports and store it in your local $GOPATH/src/
directory then build it and store it so that is available to call via import
, so you should never have to call go get
more than once unless your GOPATH
is being changed and it should always be available locally after the initial go get
.