Adopt ConfigKit module and APIs
This commit is contained in:
@@ -10,8 +10,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
||||
commandkit "go.maximumdirect.net/commandkit"
|
||||
configkit "go.maximumdirect.net/configkit"
|
||||
)
|
||||
|
||||
type adapterSettings struct {
|
||||
@@ -27,7 +27,7 @@ func adapterDefinition() configkit.Definition[adapterSettings] {
|
||||
validation.Warning(configkit.Keys("greeting"), "using the default greeting")
|
||||
}
|
||||
},
|
||||
Secret: func(path configkit.Path) bool { return path.String() == "/secret" },
|
||||
Sensitive: func(path configkit.Path) bool { return path.String() == "/secret" },
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ func TestFromConfigKitCompareIgnoresDefaultAndResolutionHistoryForEqualValues(t
|
||||
Resolve: func(value *resolvedSettings, resolution *configkit.Resolution) error {
|
||||
if value.Greeting != "resolved" {
|
||||
value.Greeting = "resolved"
|
||||
resolution.Record(configkit.Keys("greeting"), configkit.ChangeNormalization, "canonical greeting")
|
||||
resolution.RecordNormalization(configkit.Keys("greeting"), "canonical greeting")
|
||||
}
|
||||
return nil
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user