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

Interface Encoder

encoding.go:16–18  ·  encoding.go::Encoder

Encoder encodes Viper's internal data structures into a byte representation. It's primarily used for encoding a map[string]any into a file format.

Source from the content-addressed store, hash-verified

14// Encoder encodes Viper's internal data structures into a byte representation.
15// It's primarily used for encoding a map[string]any into a file format.
16type Encoder interface {
17 Encode(v map[string]any) ([]byte, error)
18}
19
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.

Callers

nothing calls this directly

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