I'm following this example here:
https://www.socketloop.com/tutorials/golang-smarter-error-handling-with-strings-contains-function
if !strings.Contains(err.Error(), "timed out") {
fmt.Printf("resulting error not a timeout: %s", err)
}
However, if I do that in my code I will get this
err.Error undefined (type interface {} is interface with no methods)
I wonder what I'm doing wrong here, and how should I check for an exact error (in my case I want to recover from the error "slice bounds out of range")
Best,