feat: allow enabling bind struct with an option

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
Mark Sagi-Kazar 2024-06-04 15:32:09 +02:00 committed by Márk Sági-Kazár
parent db85e2a92d
commit 96ad74f6ae

8
experimental.go Normal file
View file

@ -0,0 +1,8 @@
package viper
// ExperimentalBindStruct tells Viper to use the new bind struct feature.
func ExperimentalBindStruct() Option {
return optionFunc(func(v *Viper) {
v.experimentalFinder = true
})
}