Skip to content

Commit

Permalink
make help more useful
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Rubin committed Jun 17, 2015
1 parent bfc2813 commit 78b5a56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/primes
/.acc.out
/.coveralls-stamp
/cmd/primes/primes
5 changes: 3 additions & 2 deletions cmd/primes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func join(slice []uint64, sep string) string {
func init() {
app.Name = "primes"
app.Version = "1.0.0"
app.Usage = "primes <int> <int>"
app.Usage = "primes [-p] <int> <int>"
app.Authors = []cli.Author{
{Name: "Joshua Rubin", Email: "jrubin@zvelo.com"},
}
Expand All @@ -46,7 +46,8 @@ func init() {

func before(c *cli.Context) error {
if len(c.Args()) < 2 {
fmt.Println("need two integers")
cli.ShowAppHelp(c)
fmt.Println("missing one or both integers")
os.Exit(1)
}

Expand Down

0 comments on commit 78b5a56

Please sign in to comment.