Skip to content
This repository has been archived by the owner on Jun 18, 2022. It is now read-only.

Commit

Permalink
add version ability
Browse files Browse the repository at this point in the history
  • Loading branch information
Daishan Peng committed Oct 12, 2016
1 parent a9a60d4 commit f7167cb
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
package main

import (
"os"

"flag"
"fmt"
"github.com/Sirupsen/logrus"
"github.com/rancher/agent/events"
"os"
)

var VERSION = "dev"

func main() {
version := flag.Bool("version", false, "go-agent version")
flag.Parse()
if *version {
fmt.Printf("go-agent version %s \n", VERSION)
os.Exit(0)
}

logrus.Info("Launching agent")

url := os.Getenv("CATTLE_URL")
Expand Down

0 comments on commit f7167cb

Please sign in to comment.