mirror of
https://git.friendi.ca/friendica/friendica-exporter.git
synced 2025-06-07 09:54:26 +02:00
20 lines
311 B
Go
20 lines
311 B
Go
package testutil
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
// EqualErrorMessage compares two errors by just comparing their messages.
|
|
func EqualErrorMessage(a, b error) bool {
|
|
aMsg := "<nil>"
|
|
if a != nil {
|
|
aMsg = a.Error()
|
|
}
|
|
|
|
bMsg := "<nil>"
|
|
if b != nil {
|
|
bMsg = b.Error()
|
|
}
|
|
|
|
return strings.Compare(aMsg, bMsg) == 0
|
|
}
|