NewWithOptions creates a new Viper instance.
(opts ...Option)
| 271 | |
| 272 | // NewWithOptions creates a new Viper instance. |
| 273 | func NewWithOptions(opts ...Option) *Viper { |
| 274 | v := New() |
| 275 | |
| 276 | for _, opt := range opts { |
| 277 | opt.apply(v) |
| 278 | } |
| 279 | |
| 280 | return v |
| 281 | } |
| 282 | |
| 283 | // SetOptions sets the options on the global Viper instance. |
| 284 | // |