mirror of https://github.com/go-gitea/gitea
Git with a cup of tea, painless self-hosted git service
Mirror for internal git.with.parts use
https://git.with.parts
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
299 B
23 lines
299 B
8 years ago
|
package themis
|
||
|
|
||
|
import "github.com/juju/errors"
|
||
|
|
||
|
func errorEqual(err1, err2 error) bool {
|
||
|
if err1 == err2 {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
e1 := errors.Cause(err1)
|
||
|
e2 := errors.Cause(err2)
|
||
|
|
||
|
if e1 == e2 {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
if e1 == nil || e2 == nil {
|
||
|
return e1 == e2
|
||
|
}
|
||
|
|
||
|
return e1.Error() == e2.Error()
|
||
|
}
|