diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-03-17 22:03:27 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-03-17 22:03:27 +0100 |
commit | b80853de90b10171155b8f3fde47d64ec7bfa0dd (patch) | |
tree | 435d3dbf7a495a0c6ce64c9769e037179aa0d27b /config/security | |
parent | 423594e03a906ef4150f433666ff588b022c3c92 (diff) |
all: gofmt -w -r 'interface{} -> any' .
Updates #9687
Diffstat (limited to 'config/security')
-rw-r--r-- | config/security/securityConfig.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/config/security/securityConfig.go b/config/security/securityConfig.go index 09c5cb625..b27481230 100644 --- a/config/security/securityConfig.go +++ b/config/security/securityConfig.go @@ -147,15 +147,15 @@ func (c Config) CheckAllowedHTTPMethod(method string) error { } // ToSecurityMap converts c to a map with 'security' as the root key. -func (c Config) ToSecurityMap() map[string]interface{} { +func (c Config) ToSecurityMap() map[string]any { // Take it to JSON and back to get proper casing etc. asJson, err := json.Marshal(c) herrors.Must(err) - m := make(map[string]interface{}) + m := make(map[string]any) herrors.Must(json.Unmarshal(asJson, &m)) // Add the root - sec := map[string]interface{}{ + sec := map[string]any{ "security": m, } return sec @@ -196,7 +196,7 @@ func stringSliceToWhitelistHook() mapstructure.DecodeHookFuncType { return func( f reflect.Type, t reflect.Type, - data interface{}) (interface{}, error) { + data any) (any, error) { if t != reflect.TypeOf(Whitelist{}) { return data, nil |