Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
deatil committed Aug 1, 2022
1 parent 505be0a commit cc7ebb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions filesystem/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions filesystem/interfaces/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc7ebb9

Please sign in to comment.