diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2022-10-05 16:05:23 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-05 16:05:23 +1100 |
| commit | dc79c8ea59622d19db22dae6753936da2be6412f (patch) | |
| tree | 75465ddc18215115c382b97ac7a0382361f9f69c /internal/configuration/provider.go | |
| parent | 9ae703fe5152b09e0484e31d54dec573e9f0ea7c (diff) | |
refactor: any (#4133)
* refactor: any
* refactor: fix test
Diffstat (limited to 'internal/configuration/provider.go')
| -rw-r--r-- | internal/configuration/provider.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/configuration/provider.go b/internal/configuration/provider.go index 22b179331..679589c12 100644 --- a/internal/configuration/provider.go +++ b/internal/configuration/provider.go @@ -19,7 +19,7 @@ func Load(val *schema.StructValidator, sources ...Source) (keys []string, config } // LoadAdvanced is intended to give more flexibility over loading a particular path to a specific interface. -func LoadAdvanced(val *schema.StructValidator, path string, result interface{}, sources ...Source) (keys []string, err error) { +func LoadAdvanced(val *schema.StructValidator, path string, result any, sources ...Source) (keys []string, err error) { if val == nil { return keys, errNoValidator } @@ -44,7 +44,7 @@ func LoadAdvanced(val *schema.StructValidator, path string, result interface{}, return koanfGetKeys(final), nil } -func mapHasKey(k string, m map[string]interface{}) bool { +func mapHasKey(k string, m map[string]any) bool { if _, ok := m[k]; ok { return true } @@ -52,7 +52,7 @@ func mapHasKey(k string, m map[string]interface{}) bool { return false } -func unmarshal(ko *koanf.Koanf, val *schema.StructValidator, path string, o interface{}) { +func unmarshal(ko *koanf.Koanf, val *schema.StructValidator, path string, o any) { c := koanf.UnmarshalConf{ DecoderConfig: &mapstructure.DecoderConfig{ DecodeHook: mapstructure.ComposeDecodeHookFunc( |
