Skip to content

Commit

Permalink
Merge pull request #87 from Clever/wag-version-flag
Browse files Browse the repository at this point in the history
Add wag --version
  • Loading branch information
cozmo authored Nov 1, 2016
2 parents 765e314 + 0d71fab commit 5aa56f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.1.1
7 changes: 7 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,19 @@ func capitalize(input string) string {
return strings.ToUpper(input[0:1]) + input[1:]
}

var version string

func main() {

swaggerFile := flag.String("file", "swagger.yml", "the spec file to use")
goPackageName := flag.String("go-package", "", "package of the generated go code")
jsModulePath := flag.String("js-path", "", "path to put the js client")
versionFlag := flag.Bool("version", false, "print the wag version and exit")
flag.Parse()
if *versionFlag {
fmt.Println(version)
os.Exit(0)
}
if *goPackageName == "" {
log.Fatal("go-package is required")
}
Expand Down

0 comments on commit 5aa56f5

Please sign in to comment.