summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/slack-go/slack/internal/errorsx
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/slack-go/slack/internal/errorsx')
-rw-r--r--vendor/github.com/slack-go/slack/internal/errorsx/errorsx.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/vendor/github.com/slack-go/slack/internal/errorsx/errorsx.go b/vendor/github.com/slack-go/slack/internal/errorsx/errorsx.go
index cb850577..0182ec68 100644
--- a/vendor/github.com/slack-go/slack/internal/errorsx/errorsx.go
+++ b/vendor/github.com/slack-go/slack/internal/errorsx/errorsx.go
@@ -6,3 +6,12 @@ type String string
func (t String) Error() string {
return string(t)
}
+
+// Is reports whether String matches with the target error
+func (t String) Is(target error) bool {
+ if target == nil {
+ return false
+ }
+
+ return t.Error() == target.Error()
+}