WithFinder sets a custom [Finder].
(f Finder)
| 8 | |
| 9 | // WithFinder sets a custom [Finder]. |
| 10 | func WithFinder(f Finder) Option { |
| 11 | return optionFunc(func(v *Viper) { |
| 12 | if f == nil { |
| 13 | return |
| 14 | } |
| 15 | |
| 16 | v.finder = f |
| 17 | }) |
| 18 | } |
| 19 | |
| 20 | // Finder looks for files and directories in an [afero.Fs] filesystem. |
| 21 | type Finder interface { |