Migrate application configuration to the new ConfigKit API
This commit is contained in:
@@ -4,8 +4,8 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
||||
"gitea.maximumdirect.net/eric/notarius/internal/framework/pipeline"
|
||||
configkit "go.maximumdirect.net/configkit"
|
||||
)
|
||||
|
||||
// documentLoadState keeps the spelling supplied by the user while resolver
|
||||
@@ -255,7 +255,7 @@ func normalizeDocumentValue[T comparable](resolution documentNormalizer, path co
|
||||
return
|
||||
}
|
||||
if *target != value {
|
||||
resolution.Record(path, configkit.ChangeNormalization, reason)
|
||||
resolution.RecordNormalization(path, reason)
|
||||
*target = value
|
||||
}
|
||||
}
|
||||
@@ -266,7 +266,7 @@ func normalizePipelineDocumentString(resolution documentNormalizer, path configk
|
||||
}
|
||||
value := strings.TrimSpace(**target)
|
||||
if **target != value {
|
||||
resolution.Record(path, configkit.ChangeNormalization, reason)
|
||||
resolution.RecordNormalization(path, reason)
|
||||
**target = value
|
||||
}
|
||||
}
|
||||
@@ -312,7 +312,7 @@ func normalizeDocumentMap[T any](values map[string]T, path configkit.Path, kind
|
||||
}
|
||||
}
|
||||
if changed {
|
||||
resolution.Record(path, configkit.ChangeNormalization, "normalized "+kind+" keys", dependencies...)
|
||||
resolution.RecordNormalization(path, "normalized "+kind+" keys", dependencies...)
|
||||
values = result
|
||||
}
|
||||
return values
|
||||
|
||||
Reference in New Issue
Block a user