WithEncoderRegistry sets a custom [EncoderRegistry].
(r EncoderRegistry)
| 57 | |
| 58 | // WithEncoderRegistry sets a custom [EncoderRegistry]. |
| 59 | func WithEncoderRegistry(r EncoderRegistry) Option { |
| 60 | return optionFunc(func(v *Viper) { |
| 61 | if r == nil { |
| 62 | return |
| 63 | } |
| 64 | |
| 65 | v.encoderRegistry = r |
| 66 | }) |
| 67 | } |
| 68 | |
| 69 | // WithDecoderRegistry sets a custom [DecoderRegistry]. |
| 70 | func WithDecoderRegistry(r DecoderRegistry) Option { |
nothing calls this directly
no test coverage detected