func (b *BuildOutput) YAMLStream() ([]byte, error) {
	if b.yamlStream != nil {
		return b.yamlStream, nil
	}
	stream, err := toYAMLStream(b.SortedObjects())
	if err != nil {
		return nil, err
	}
	b.yamlStream = stream
	return b.yamlStream, nil
}
YAMLStream produces a yaml stream of the objects in this build output. The stream
is cached internally so modifications to this output will not affect the produced
stream from the first call.
package jsonnet
import (
	"sort"
	goyaml "gopkg.in/yaml.v2"
	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)
type BuildOutput struct {
	objects ObjectSorter
	sorted bool
	yamlStream []byte
}
func newBuildOutput() *BuildOutput {
	return &BuildOutput{objects: make(ObjectSorter, 0)}
}
func (b *BuildOutput) append(obj *unstructured.Unstructured) {
	b.objects = append(b.objects, obj)
}