mirror of
https://github.com/wahyd4/forego.git
synced 2026-08-09 05:07:05 +10:00
remove optional version from update
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var cmdUpdate = &Command{
|
||||
Run: runUpdate,
|
||||
Usage: "update [version]",
|
||||
Usage: "update",
|
||||
Short: "Update forego",
|
||||
Long: `
|
||||
Update forego
|
||||
@@ -15,7 +15,6 @@ Update forego
|
||||
Examples:
|
||||
|
||||
forego update
|
||||
forego update 0.7.8
|
||||
`,
|
||||
}
|
||||
|
||||
@@ -28,14 +27,7 @@ func runUpdate(cmd *Command, args []string) {
|
||||
return
|
||||
}
|
||||
d := dist.NewDist("ddollar/forego", Version)
|
||||
var err error
|
||||
var to string
|
||||
if len(args) > 0 {
|
||||
err = d.UpdateTo(args[0])
|
||||
to = args[0]
|
||||
} else {
|
||||
to, err = d.Update()
|
||||
}
|
||||
to, err := d.Update()
|
||||
if err != nil {
|
||||
fmt.Printf("ERROR: %s\n", err)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user