зеркало из https://github.com/mislav/hub.git
25 строки
342 B
Go
25 строки
342 B
Go
package commands
|
|
|
|
import (
|
|
"github.com/jingweno/gh/utils"
|
|
"os"
|
|
)
|
|
|
|
var cmdUpdate = &Command{
|
|
Run: update,
|
|
Usage: "update",
|
|
Short: "Update gh",
|
|
Long: `Update gh to the latest version.
|
|
|
|
Examples:
|
|
git update
|
|
`,
|
|
}
|
|
|
|
func update(cmd *Command, args *Args) {
|
|
updater := NewUpdater()
|
|
err := updater.Update()
|
|
utils.Check(err)
|
|
os.Exit(0)
|
|
}
|