mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-09-30 03:31:27 +02:00
@@ -83,12 +83,11 @@ func Decode(input interface{}, result interface{}) error {
|
||||
DecodeHook: mapstructure.ComposeDecodeHookFunc(toDurationHookFunc()),
|
||||
Metadata: nil, // Don't track any metadata
|
||||
Result: result, // Decode the result into the prefilled options
|
||||
TagName: "json", // Parse all fields that use the yaml tag
|
||||
TagName: "json", // Parse all fields that use the json tag
|
||||
ZeroFields: false, // Don't clean the default values from the result map (options)
|
||||
ErrorUnused: true, // Throw an error if keys have been used that aren't mapped to any struct fields
|
||||
IgnoreUntaggedFields: true, // Ignore fields in structures that aren't tagged with yaml
|
||||
IgnoreUntaggedFields: true, // Ignore fields in structures that aren't tagged with json
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("error creating decoder for config: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user