From 5c7d2aa7733ea3c28adbc5d8785c99dee9699571 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Mon, 11 Feb 2019 13:26:34 -0800 Subject: [PATCH] document why Manifest.MarshalYAML is disabled --- yaml/manifest.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yaml/manifest.go b/yaml/manifest.go index 7ab4093..2b0431a 100644 --- a/yaml/manifest.go +++ b/yaml/manifest.go @@ -102,7 +102,10 @@ func (m *Manifest) MarshalJSON() ([]byte, error) { 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) { return nil, errors.New("yaml: marshal not implemented") }