document why Manifest.MarshalYAML is disabled

This commit is contained in:
Brad Rydzewski 2019-02-11 13:26:34 -08:00
parent 27bbe8c889
commit 5c7d2aa773

View File

@ -102,7 +102,10 @@ func (m *Manifest) MarshalJSON() ([]byte, error) {
return json.Marshal(m.Resources) return json.Marshal(m.Resources)
} }
// MarshalYAML implement the yaml.Marshaler. // MarshalYAML is not implemented and returns an error. This is
// because the Manifest is a representation of multiple yaml
// documents, and MarshalYAML would otherwise attempt to marshal
// as a single Yaml document. Use the Encode method instead.
func (m *Manifest) MarshalYAML() (interface{}, error) { func (m *Manifest) MarshalYAML() (interface{}, error) {
return nil, errors.New("yaml: marshal not implemented") return nil, errors.New("yaml: marshal not implemented")
} }