Closed
Description
Hello! Right now you have type errorHandler:
type errorHandler func(w http.ResponseWriter, r *http.Request, err string)
i think, it seems too restricted, because type of err is string, instead of error. In case of type error, interface will be more Go-ideomatic. And in the client error handler it will be possible to operate with types, not strings:
err, ok := error.(MySuperError)
if ok == true {
//do something with this error
}
instead:
if err == "Hey man! I'am Your Super Error! How are you? Are you missing?" {
//do something
}
What do you think?
Metadata
Metadata
Assignees
Labels
No labels