spf13 / viper

Go configuration with fangs
MIT License
26.93k stars 2.02k forks source link

Align Get* and Unmarshal behavior better #1744

Open sagikazarmark opened 8 months ago

sagikazarmark commented 8 months ago

Preflight Checklist

Problem Description

Different forms of reading from Viper often lead to different results due to different implementations.

For example:

Proposed Solution

Use a single implementation (mapstructure+decode hooks? UnmarshalKey?) for all forms of reading from Viper.

Chances are this would be a breaking change, so it either needs a feature flag or needs to be delayed to v2.

Alternatives Considered

No response

Additional Information

No response