diff options
author | Martin Treusch von Buttlar <martin.tvb@vitraum.de> | 2017-05-16 07:12:54 +0200 |
---|---|---|
committer | Martin Treusch von Buttlar <martin.tvb@vitraum.de> | 2017-05-16 07:12:54 +0200 |
commit | 4ad35136b67fb35c1dac1662d9330e2a1cfcca58 (patch) | |
tree | fa527b2e75748fbd27a4f8d234e5a1bb870a29b2 | |
parent | d89c33c1398428d4a456ca0252e6b1718efb0b96 (diff) |
fix new command
-rw-r--r-- | cmd/ponzu/new.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/cmd/ponzu/new.go b/cmd/ponzu/new.go index d5afadb..9e5a9d4 100644 --- a/cmd/ponzu/new.go +++ b/cmd/ponzu/new.go @@ -1,7 +1,6 @@ package main import ( - "errors" "fmt" "os" "os/exec" @@ -12,9 +11,9 @@ import ( ) var newCmd = &cobra.Command{ - Use: "new <projectName>", - Short: "creates a 'ponzu' directory by the name supplied as a parameter", - Long: `Creates a 'ponzu' directory by the name supplied as a parameter + Use: "new [projectName]", + Short: "creates a 'ponzu' directory or the name supplied as a parameter", + Long: `Creates a 'ponzu' directory or one by the name supplied as a parameter immediately following the 'new' option in the $GOPATH/src directory. Note: 'new' depends on the program 'git' and possibly a network connection. If there is no local repository to clone from at the local machine's $GOPATH, @@ -25,10 +24,6 @@ Errors will be reported, but successful commands return nothing.`, Example: `$ ponzu new myProject > New ponzu project created at $GOPATH/src/myProject`, RunE: func(cmd *cobra.Command, args []string) error { - if len(args) < 1 { - return errors.New("project name not supplied") - } - return newProjectInDir(args[0]) }, } |