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

Commit

Permalink
Merge pull request #14 from geetarista/version-flag
Browse files Browse the repository at this point in the history
feat(etcdctl): add version flag
  • Loading branch information
philips committed Oct 11, 2013
2 parents 73f9c0f + b409fee commit 5aaeca1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions etcdctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,22 @@ import (

var (
client *etcd.Client

printVersion bool
)

func main() {
flag.BoolVar(&printVersion, "version", false, "print the version and exit")

cluster := ClusterValue{"http://localhost:4001"}
flag.Var(&cluster, "C", "a comma seperated list of machine addresses in the cluster e.g. 127.0.0.1:4001,127.0.0.1:4002")
flag.Parse()

if printVersion {
fmt.Println(releaseVersion)
os.Exit(0)
}

client = etcd.NewClient(cluster.GetMachines())

args := flag.Args()
Expand Down

0 comments on commit 5aaeca1

Please sign in to comment.