MCPcopy
hub / github.com/spf13/viper / WithEncoderRegistry

Function WithEncoderRegistry

encoding.go:59–67  ·  view source on GitHub ↗

WithEncoderRegistry sets a custom [EncoderRegistry].

(r EncoderRegistry)

Source from the content-addressed store, hash-verified

57
58// WithEncoderRegistry sets a custom [EncoderRegistry].
59func 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].
70func WithDecoderRegistry(r DecoderRegistry) Option {

Callers

nothing calls this directly

Calls 1

optionFuncFuncType · 0.85

Tested by

no test coverage detected