From 96ad74f6ae3e22a2349821a1c2bc197eaae5a14d Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Tue, 4 Jun 2024 15:32:09 +0200 Subject: [PATCH] feat: allow enabling bind struct with an option Signed-off-by: Mark Sagi-Kazar --- experimental.go | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 experimental.go diff --git a/experimental.go b/experimental.go new file mode 100644 index 0000000..f648f84 --- /dev/null +++ b/experimental.go @@ -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 + }) +}