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
parent 676d2eb166
commit 29d94f84b7
No known key found for this signature in database
GPG key ID: 31AB0439F4C5C90E

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
})
}