-
-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
The following code
if isNil(a) || isNil(b) {
is.logf("%s != %s", is.valWithType(a), is.valWithType(b))
} else if reflect.ValueOf(a).Type() == reflect.ValueOf(b).Type() {
is.logf("%v != %v", a, b)
} else {
is.logf("%s != %s", is.valWithType(a), is.valWithType(b))
}can be simplified to
if isNil(a) || isNil(b) || reflect.ValueOf(a).Type() != reflect.ValueOf(b).Type() {
is.logf("%s != %s", is.valWithType(a), is.valWithType(b))
} else {
is.logf("%v != %v", a, b)
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels