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 11, 2016
1 parent a9a60d4 commit abadac7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,22 @@ package main
import (
"os"

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

var Version = "v0.1.5-agent"

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 abadac7

Please sign in to comment.