Thanks to Armand !
@ -0,0 +1,4 @@
,Reject,poor,fair,good,Very good,excellent
Massinissa,2,0,0,0,0,0
Armand,0,2,0,0,0,0
Thomas,0,0,1,1,0,0
@ -62,6 +62,12 @@ var testData = []struct {
"example/example11.ssv",
},
{
name: "CRLF, example12.ssv",
args: []string{
"example/example12.ssv",
name: "--sort usage, example.csv",
@ -31,6 +31,9 @@ func sanitizeInput(input string) string {
// Remove duplicate spaces
sanitized = regexp.MustCompile(` +`).ReplaceAllString(sanitized, " ")
// Remove Carriage Return (CRLF into LF)
sanitized = regexp.MustCompile(`\r\n`).ReplaceAllString(sanitized, "\n")
// …
return sanitized