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

Interface Decoder

encoding.go:22–24  ·  view source on GitHub ↗

Decoder decodes the contents of a byte slice into Viper's internal data structures. It's primarily used for decoding contents of a file into a map[string]any.

Source from the content-addressed store, hash-verified

20// Decoder decodes the contents of a byte slice into Viper's internal data structures.
21// It's primarily used for decoding contents of a file into a map[string]any.
22type Decoder interface {
23 Decode(b []byte, v map[string]any) error
24}
25
26// Codec combines [Encoder] and [Decoder] interfaces.
27type Codec interface {

Callers 2

decodeFunction · 0.95
unmarshalReaderMethod · 0.65

Implementers 5

codecencoding_test.go
Codecinternal/encoding/dotenv/codec.go
Codecinternal/encoding/toml/codec.go
Codecinternal/encoding/yaml/codec.go
Codecinternal/encoding/json/codec.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…