Skip to content

When UnmarshalConf.DecoderConfig is passed in, parameter o is not effective. #359

@tsln1998

Description

@tsln1998

Describe the bug

When UnmarshalConf.DecoderConfig is passed in, parameter o is not effective.

To Reproduce

if err := loader.UnmarshalWithConf("server", o, koanf.UnmarshalConf{
	DecoderConfig: &mapstructure.DecoderConfig{
		WeaklyTypedInput: true,
	},
}); err != nil {
	return nil, err
}

Expected behavior

The data can be deserialized into o normally

Additional context
https://github.com/knadh/koanf/blob/6e430e8aa9c05842b2384244b098e97e62aaf8b3/koanf.go#L250:L283

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions