Skip to content

Commit

Permalink
Merge pull request #5 from wickett/master
Browse files Browse the repository at this point in the history
print help if there are no arguments given
  • Loading branch information
mtesauro committed Apr 10, 2015
2 parents 45ef387 + 1e80212 commit 2ceb944
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jerry-curl.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
This file, jerry-curl, is a wrapper for the curl command allowing
default arguements to be easly added when invoking curl. This is
partularly useful when headers need to be added to every request
such as HTTP basic auth or talking to REST APIs.
such as HTTP basic auth or talking to REST APIs.
jerry-curl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -278,6 +278,11 @@ func parseArgs(args []string) (map[int]string, []string) {
skip := true
var next string

// If jerry-curl is called witn no arguments then print the help menu and exit
if len(args) == 1 {
printHelp()
}

// iterate through args sent and place jerry-curl args into one map
// all other args are passed through to curl via curlArgs
for n, arg := range args {
Expand Down

0 comments on commit 2ceb944

Please sign in to comment.