package clinit import ( "go.etcd.io/etcd/client/v3" ) var cli *clientv3.Client func GetEtcdClient() *clientv3.Client { return cli } func EctdHandler(etcdAddrs []string) { var err error cli , err = clientv3.New(clientv3.Config{ Endpoints: etcdAddrs, }) if err != nil { panic(err) } return }