Compare compares two strings, a for actual, e for expected, and returns true or false. The comparison is done, by filtering out whitespace (i.e. space, tabs and newline).
(a string, e string)
| 22 | // Compare compares two strings, a for actual, e for expected, and returns true or false. The comparison is done, |
| 23 | // by filtering out whitespace (i.e. space, tabs and newline). |
| 24 | func Compare(a string, e string) bool { |
| 25 | return stripWhitespace(a) == stripWhitespace(e) |
| 26 | } |
| 27 | |
| 28 | // DiffMessage creates a diff dump message for test failures. |
| 29 | func DiffMessage(context string, actual interface{}, expected interface{}) string { |