code: func ReadYAML(reader io.Reader) (interface{}, error) {
  	decoder := kyaml.NewYAMLOrJSONDecoder(reader, 32*1024)
  	var values []interface{}
  	for {
  		var val interface{}
  		err := decoder.Decode(&val)
  		if err != nil {
  			if err == io.EOF {
  				if len(values) == 0 {
  					return nil, trace.BadParameter("no resources found, empty input?")
  				}
  				if len(values) == 1 {
  					return values[0], nil
  				}
  				return values, nil
  			}
  			return nil, trace.Wrap(err)
  		}
  		values = append(values, val)
  	}
  }
docs: // ReadYAML can unmarshal a stream of documents, used in tests.