mirror of https://github.com/spf13/viper.git
feat: add experimental finder option
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
parent
db0bbd8f97
commit
2636060878
|
@ -13,6 +13,13 @@ func WithFinder(f Finder) Option {
|
|||
})
|
||||
}
|
||||
|
||||
// ExperimentalFinder tells Viper to use the new Finder interface for finding configuration files.
|
||||
func ExperimentalFinder() Option {
|
||||
return optionFunc(func(v *Viper) {
|
||||
v.experimentalFinder = true
|
||||
})
|
||||
}
|
||||
|
||||
// Finder looks for files and directories in an [afero.Fs] filesystem.
|
||||
type Finder interface {
|
||||
Find(fsys afero.Fs) ([]string, error)
|
||||
|
|
Loading…
Reference in New Issue