SetOptions sets the options on the global Viper instance. Be careful when using this function: subsequent calls may override options you set. It's always better to use a local Viper instance.
(opts ...Option)
| 285 | // Be careful when using this function: subsequent calls may override options you set. |
| 286 | // It's always better to use a local Viper instance. |
| 287 | func SetOptions(opts ...Option) { |
| 288 | for _, opt := range opts { |
| 289 | opt.apply(v) |
| 290 | } |
| 291 | } |
| 292 | |
| 293 | // Reset is intended for testing, will reset all to default settings. |
| 294 | // In the public interface for the viper package so applications |