Ethan
Ethan

Reputation: 1067

Golang tool for git pull?

I'm trying to make it easy for the not-too-technical to use my golang program as a command line application. I want them to be able to update the code easily too when I push changes to github. Is there a way to update a library using something like "go update github.com/user/repo" so they don't have to cd to the src directory and git pull themselves? Or at this point must I simply say "time to learn git"?

Upvotes: 0

Views: 1079

Answers (1)

Mr_Pink
Mr_Pink

Reputation: 109443

You can use:

go get -u import/path

The -u flag instructs get to use the network to update the named packages and their dependencies. By default, get uses the network to check out missing packages but does not use it to look for updates to existing packages.

Upvotes: 4

Related Questions