summaryrefslogtreecommitdiff
path: root/cmd/ponzu/main.go
diff options
context:
space:
mode:
authorOllie Phillips <oliver@eantics.co.uk>2017-02-24 15:17:28 +0000
committerOllie Phillips <oliver@eantics.co.uk>2017-02-24 15:17:28 +0000
commitfff0a34cffd686c09144058cbba44146fabc42e5 (patch)
treedd7e3e7004dd57d1cca675632773a2c08f0929be /cmd/ponzu/main.go
parentae242b7f926b1fcbec36d66df8355f432219d1c9 (diff)
add as command line option and usage text
Diffstat (limited to 'cmd/ponzu/main.go')
-rw-r--r--cmd/ponzu/main.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/cmd/ponzu/main.go b/cmd/ponzu/main.go
index f44f626..494158d 100644
--- a/cmd/ponzu/main.go
+++ b/cmd/ponzu/main.go
@@ -88,6 +88,10 @@ func main() {
case "version", "v":
fmt.Println(usageVersion)
os.Exit(0)
+
+ case "add", "a":
+ fmt.Println(usageAdd)
+ os.Exit(0)
}
case "new":
@@ -265,6 +269,13 @@ func main() {
fmt.Println("Input not recognized. No upgrade made. Answer as 'y' or 'n' only.")
}
+ case "add", "a":
+ // expecting two args, add and the go gettable package uri
+ if len(args) < 2 {
+ fmt.Println(usageAdd)
+ os.Exit(0)
+ }
+
case "":
fmt.Println(usage)
fmt.Println(usageHelp)