code: func (r *YAMLReader) Read() ([]byte, error) {
  	var buffer bytes.Buffer
  	for {
  		line, err := r.reader.Read()
  		if err != nil && err != io.EOF {
  			return nil, err
  		}
  
  		sep := len([]byte(separator))
  		if i := bytes.Index(line, []byte(separator)); i == 0 {
  			// We have a potential document terminator
  			i += sep
  			after := line[i:]
  			if len(strings.TrimRightFunc(string(after), unicode.IsSpace)) == 0 {
  				if buffer.Len() != 0 {
  					return buffer.Bytes(), nil
  				}
  				if err == io.EOF {
  					return nil, err
  				}
  			}
  		}
  		if err == io.EOF {
  			if buffer.Len() != 0 {
  				// If we're at EOF, we have a final, non-terminated line. Return it.
  				return buffer.Bytes(), nil
  			}
  			return nil, err
  		}
  		buffer.Write(line)
  	}
  }
docs: // Read returns a full YAML document.