Skip to content

Commit

Permalink
Add version number
Browse files Browse the repository at this point in the history
  • Loading branch information
pasela committed Mar 26, 2018
1 parent a04aa02 commit 8989a5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (
)

const (
ApplicationName = "git-cgi-server"

defaultAddr = ":8080"
shutdownTimeout = time.Second * 5
)
Expand All @@ -33,7 +35,8 @@ func parseArgs() (*Args, error) {
var args Args

flag.Usage = func() {
fmt.Fprintf(flag.CommandLine.Output(), "Usage: %s [REPOS_DIR]\n", os.Args[0])
fmt.Fprintf(flag.CommandLine.Output(),
"%s v%s\n\nUsage: %s [REPOS_DIR]\n", ApplicationName, Version, os.Args[0])
flag.PrintDefaults()
}

Expand Down
3 changes: 3 additions & 0 deletions version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package main

const Version = "1.0.0"

0 comments on commit 8989a5f

Please sign in to comment.