Some of the existing answers on here about how to determine the type of an object at runtime..god help us
if reflect.TypeOf(err) == string {
}
that doesn't compile
if reflect.TypeOf(err) == "string" {
}
neither does that or this:
if reflect.TypeOf(err).Kind() == "string" {
}
how do we do this?
If I use the typeof function given by one of the answers, I get: