Explorar o código

fix(etcd): add a default name

etcd shouldn't require flags by default.
Brandon Philips %!s(int64=12) %!d(string=hai) anos
pai
achega
5a88da1d37
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      etcd.go

+ 1 - 1
etcd.go

@@ -58,7 +58,7 @@ func init() {
 	flag.StringVar(&machines, "C", "", "the ip address and port of a existing machines in the cluster, sepearate by comma")
 	flag.StringVar(&machinesFile, "CF", "", "the file contains a list of existing machines in the cluster, seperate by comma")
 
-	flag.StringVar(&argInfo.Name, "n", "", "the node name (required)")
+	flag.StringVar(&argInfo.Name, "n", "default-name", "the node name (required)")
 	flag.StringVar(&argInfo.EtcdURL, "c", "127.0.0.1:4001", "the hostname:port for etcd client communication")
 	flag.StringVar(&argInfo.RaftURL, "s", "127.0.0.1:7001", "the hostname:port for raft server communication")
 	flag.StringVar(&argInfo.WebURL, "w", "", "the hostname:port of web interface")