Skip to content

Commit

Permalink
add version flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ezekg committed Apr 20, 2016
1 parent 0a8f5c6 commit bc8fd09
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,21 @@ import (
)

var (
noColor = flag.Bool("no-color", false, "Disable color output")
config = flag.String("config", ".githound.yml", "Hound config file")
bin = flag.String("bin", "git", "Executable binary to use for git command")
version = "0.5.2"
showVersion = flag.Bool("v", false, "Show version")
noColor = flag.Bool("no-color", false, "Disable color output")
config = flag.String("config", ".githound.yml", "Hound config file")
bin = flag.String("bin", "git", "Executable binary to use for git command")
)

func main() {
flag.Parse()

if *showVersion {
fmt.Printf("%s\n", version)
os.Exit(0)
}

if *noColor {
color.NoColor = true
}
Expand Down

0 comments on commit bc8fd09

Please sign in to comment.