blob: 24cc19dfcadce8adc75b5877a2120135399b4fb5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
package yaml
// import "gopkg.in/yaml.v2"
// Codec implements the encoding.Encoder and encoding.Decoder interfaces for YAML encoding.
type Codec struct{}
func (Codec) Encode(v map[string]interface{}) ([]byte, error) {
return yaml.Marshal(v)
}
func (Codec) Decode(b []byte, v map[string]interface{}) error {
return yaml.Unmarshal(b, &v)
}
|