code: func NewDocumentDecoder(r io.ReadCloser) io.ReadCloser {
  	scanner := bufio.NewScanner(r)
  	scanner.Split(splitYAMLDocument)
  	return &YAMLDecoder{
  		r:       r,
  		scanner: scanner,
  	}
  }
docs: // NewDocumentDecoder decodes YAML documents from the provided
  // stream in chunks by converting each document (as defined by
  // the YAML spec) into its own chunk. io.ErrShortBuffer will be
  // returned if the entire buffer could not be read to assist
  // the caller in framing the chunk.