fix(with/etcd): 修改Etcd配置为空时的处理逻辑
当Etcd配置或端点为空时,将panic改为直接返回,避免程序崩溃
This commit is contained in:
parent
4f584726d6
commit
5e25e8eccc
|
@ -13,7 +13,7 @@ import (
|
|||
|
||||
func Etcd(cfg *conf.EtcdConf, cli *clientv3.Client) {
|
||||
if cfg == nil || len(cfg.Endpoints) == 0 {
|
||||
panic("Etcd endpoints is Empty!")
|
||||
return
|
||||
}
|
||||
|
||||
etcdCfg := clientv3.Config{
|
||||
|
|
Loading…
Reference in New Issue