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

Function NewCodecRegistry

encoding.go:101–107  ·  view source on GitHub ↗

NewCodecRegistry returns a new [CodecRegistry], ready to accept custom [Codec]s.

()

Source from the content-addressed store, hash-verified

99
100// NewCodecRegistry returns a new [CodecRegistry], ready to accept custom [Codec]s.
101func NewCodecRegistry() *DefaultCodecRegistry {
102 r := &DefaultCodecRegistry{}
103
104 r.init()
105
106 return r
107}
108
109func (r *DefaultCodecRegistry) init() {
110 r.once.Do(func() {

Callers 2

NewFunction · 0.85
TestDefaultCodecRegistryFunction · 0.85

Calls 1

initMethod · 0.95

Tested by 1

TestDefaultCodecRegistryFunction · 0.68