We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3eab754 commit 6c1ffe9Copy full SHA for 6c1ffe9
src/errors/errors.go
@@ -67,3 +67,11 @@ type errorString struct {
67
func (e *errorString) Error() string {
68
return e.s
69
}
70
+
71
+// Temporary returns true if it makes sense to retry the call that returned the error.
72
+func Temporary(err error) bool {
73
+ if err, ok := err.(interface{ Temporary() bool }); ok {
74
+ return err.Temporary()
75
+ }
76
+ return false
77
+}
0 commit comments