code: func scanForErrors(buf []byte) [][]byte {
  	var res [][]byte
  	for len(buf) > 0 {
  		if buf[0] != '-' {
  			return nil
  		}
  		buf = buf[1:]
  		for i := 0; i < len(buf); i++ {
  			if buf[i] == '\n' && i > 0 && buf[i-1] == '\r' {
  				res = append(res, buf[:i-1])
  				buf = buf[i+1:]
  				break
  			}
  		}
  	}
  	return res
  }
docs: // scanForErrors returns pipeline errors. All messages must be errors