From 3f4189fd40ea84039d2fa13cc9c837857074d30d Mon Sep 17 00:00:00 2001 From: duanhf2012 <6549168@qq.com> Date: Wed, 9 Oct 2024 18:14:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A9=E5=B1=95=E6=94=AF=E6=8C=81yaml?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cluster/parsecfg.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cluster/parsecfg.go b/cluster/parsecfg.go index 9867df6..d1425e3 100644 --- a/cluster/parsecfg.go +++ b/cluster/parsecfg.go @@ -251,7 +251,7 @@ func (cls *Cluster) readLocalClusterConfig(nodeId string) (DiscoveryInfo, []Node //读取任何文件,只读符合格式的配置,目录下的文件可以自定义分文件 for _, f := range fileInfoList { - if f.IsDir() == true || (filepath.Ext(f.Name()) != ".json" && filepath.Ext(f.Name()) != ".yml") { + if f.IsDir() == true || (filepath.Ext(f.Name()) != ".json" && filepath.Ext(f.Name()) != ".yml" && filepath.Ext(f.Name()) != ".yaml") { continue } @@ -309,7 +309,7 @@ func (cls *Cluster) readLocalService(localNodeId string) error { //读取任何文件,只读符合格式的配置,目录下的文件可以自定义分文件 for _, f := range fileInfoList { - if f.IsDir() == true || (filepath.Ext(f.Name()) != ".json" && filepath.Ext(f.Name()) != ".yml") { + if f.IsDir() == true || (filepath.Ext(f.Name()) != ".json" && filepath.Ext(f.Name()) != ".yml" && filepath.Ext(f.Name()) != ".yaml") { continue }