mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdctl/ctlv3: etcd v3.4 makes ETCDCTL_API=3 by default
This commit is contained in:
@@ -31,13 +31,13 @@ func main() {
|
||||
apiv := os.Getenv(apiEnv)
|
||||
// unset apiEnv to avoid side-effect for future env and flag parsing.
|
||||
os.Unsetenv(apiEnv)
|
||||
if len(apiv) == 0 || apiv == "2" {
|
||||
ctlv2.Start(apiv)
|
||||
if len(apiv) == 0 || apiv == "3" {
|
||||
ctlv3.Start(apiv)
|
||||
return
|
||||
}
|
||||
|
||||
if apiv == "3" {
|
||||
ctlv3.Start()
|
||||
if apiv == "2" {
|
||||
ctlv2.Start()
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user