Compare commits

..

1 Commits

Author SHA1 Message Date
5e25e8eccc fix(with/etcd): 修改Etcd配置为空时的处理逻辑
当Etcd配置或端点为空时,将panic改为直接返回,避免程序崩溃
2025-09-20 11:08:47 +08:00

View File

@@ -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{