Skip to content

Commit

Permalink
[enh] add versioning (semver)
Browse files Browse the repository at this point in the history
  • Loading branch information
asciimoo committed Feb 11, 2017
1 parent e73584b commit ce4d129
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion wuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
"github.com/jroimartin/gocui"
)

const VERSION = "0.1.0"

var METHODS []string = []string{
http.MethodGet,
http.MethodPost,
Expand Down Expand Up @@ -976,6 +978,10 @@ func help() {
Usage: wuzz [-H|--header=HEADER]... [-d|--data=POST_DATA] [-X|--request=METHOD] [-t|--timeout=MSECS] [URL]
Other command line options:
-h, --help Show this
-v, --version Display version number
Key bindings:
ctrl+r Send request
ctrl+s Save response
Expand All @@ -989,9 +995,13 @@ Key bindings:

func main() {
for _, arg := range os.Args {
if arg == "-h" || arg == "--help" {
switch arg {
case "-h", "--help":
help()
return
case "-v", "--version":
fmt.Printf("wuzz %v\n", VERSION)
return
}
}
g, err := gocui.NewGui(gocui.Output256)
Expand Down

0 comments on commit ce4d129

Please sign in to comment.