MarshalYAML implements the yaml.Marshaler interface.
()
| 150 | |
| 151 | // MarshalYAML implements the yaml.Marshaler interface. |
| 152 | func (h Hash) MarshalYAML() (interface{}, error) { |
| 153 | return h.String(), nil |
| 154 | } |
| 155 | |
| 156 | // UnmarshalYAML implements the yaml.Unmarshaler interface. |
| 157 | func (h *Hash) UnmarshalYAML(unmarshal func(interface{}) error) error { |