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.
| 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. |
| 16 | type 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. |