Skip to content

Commit

Permalink
trim and ommit empty
Browse files Browse the repository at this point in the history
  • Loading branch information
cybre committed Jan 13, 2024
1 parent f4e7340 commit 80e6a9a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion internal/differ/differ.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,15 @@ func extractColumnValues(file File) ([]string, error) {
break
}

values = append(values, strings.ToLower(row[file.DiffColumnIndex]))
value := strings.TrimFunc(strings.ToLower(row[file.DiffColumnIndex]), func(r rune) bool {
return r == '"' || r == ' '
})

if value == "" {
continue
}

values = append(values, value)
}

return values, nil
Expand Down

0 comments on commit 80e6a9a

Please sign in to comment.