mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-18 22:41:04 +02:00
fix merge problems and test cases
Signed-off-by: Jan Larwig <jan@larwig.com>
This commit is contained in:
@@ -89,7 +89,10 @@ func LoadYAML(configFileName string, opts interface{}) error {
|
||||
// - An error if decoding fails or if there are unmapped keys.
|
||||
func Decode(input interface{}, result interface{}) error {
|
||||
decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{
|
||||
DecodeHook: mapstructure.ComposeDecodeHookFunc(toDurationHookFunc()),
|
||||
DecodeHook: mapstructure.ComposeDecodeHookFunc(
|
||||
toDurationHookFunc(),
|
||||
stringToBytesHookFunc(),
|
||||
),
|
||||
Metadata: nil, // Don't track any metadata
|
||||
Result: result, // Decode the result into the prefilled options
|
||||
TagName: "yaml", // Parse all fields that use the json tag
|
||||
|
||||
Reference in New Issue
Block a user