(value string, stripTrailingCR bool)
| 471 | } |
| 472 | |
| 473 | func split(value string, stripTrailingCR bool) []string { |
| 474 | const sep = "\n" |
| 475 | split := strings.Split(value, sep) |
| 476 | if !stripTrailingCR { |
| 477 | return split |
| 478 | } |
| 479 | var stripped []string |
| 480 | for _, s := range split { |
| 481 | stripped = append(stripped, strings.TrimSuffix(s, "\r")) |
| 482 | } |
| 483 | return stripped |
| 484 | } |
| 485 | |
| 486 | func printDiffRecords(suppressedKinds []string, kind string, context int, diffs []difflib.DiffRecord, to io.Writer) { |
| 487 | for _, ckind := range suppressedKinds { |