mirror of
https://github.com/spf13/viper
synced 2025-05-11 06:37:27 +00:00
12 lines
420 B
Go
12 lines
420 B
Go
|
package codec
|
||
|
|
||
|
type Codec interface {
|
||
|
// Decode decodes the contents of b into v.
|
||
|
// It's primarily used for decoding contents of a file into a map[string]interface{}.
|
||
|
Decode(b []byte, v map[string]interface{}) error
|
||
|
|
||
|
// Encode encodes the contents of v into a byte representation.
|
||
|
// It's primarily used for encoding a map[string]interface{} into a file format.
|
||
|
Encode(v map[string]interface{}) ([]byte, error)
|
||
|
}
|