Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #213 from jodh-intel/add-version-cli-option
Browse files Browse the repository at this point in the history
main: Add a CLI version option
  • Loading branch information
Julio Montes authored Mar 8, 2018
2 parents 6f6e9ec + 14c4a2d commit a817c00
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ func init() {
var Version = "unknown"

func main() {
if len(os.Args) == 2 && os.Args[1] == "--version" {
fmt.Printf("%s version %s\n", name, Version)
os.Exit(0)
}

agentLog.Logger.Formatter = &logrus.JSONFormatter{TimestampFormat: time.RFC3339Nano}
config := newConfig(defaultLogLevel)
Expand Down

0 comments on commit a817c00

Please sign in to comment.