From cc7ebb94dc22c293c1f7c5f2542b353003f36cec Mon Sep 17 00:00:00 2001 From: deatil <2217957370@qq.com> Date: Mon, 1 Aug 2022 22:25:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- filesystem/config/config.go | 4 ++-- filesystem/interfaces/config.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/filesystem/config/config.go b/filesystem/config/config.go index d579644..c4672dc 100644 --- a/filesystem/config/config.go +++ b/filesystem/config/config.go @@ -32,7 +32,7 @@ type Config struct { /** * 覆盖旧数据 */ -func (this Config) Set(data DataMap) interfaces.Config { +func (this Config) With(data DataMap) interfaces.Config { this.Data = data return this @@ -41,7 +41,7 @@ func (this Config) Set(data DataMap) interfaces.Config { /** * 设置单个新数据 */ -func (this Config) With(key string, value any) interfaces.Config { +func (this Config) Set(key string, value any) interfaces.Config { this.Data[key] = value return this diff --git a/filesystem/interfaces/config.go b/filesystem/interfaces/config.go index dd4286a..d09d2f0 100644 --- a/filesystem/interfaces/config.go +++ b/filesystem/interfaces/config.go @@ -8,10 +8,10 @@ package interfaces */ type Config interface { // 覆盖旧数据 - Set(map[string]any) Config + With(map[string]any) Config // 设置单个新数据 - With(string, any) Config + Set(string, any) Config // 是否存在 Has(string) bool