diff options
author | Wim <wim@42.be> | 2022-03-12 19:41:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-12 19:41:07 +0100 |
commit | b3be2e208cb373207d6199cac5a9fc92be073e7a (patch) | |
tree | 6de6d444737edee8f0476eea87c233fa980f0002 /vendor/github.com/slack-go/slack/webhooks_go112.go | |
parent | c30e90ff3f7e9ff96ac79ed4b7d90d6346216a15 (diff) | |
download | matterbridge-msglm-b3be2e208cb373207d6199cac5a9fc92be073e7a.tar.gz matterbridge-msglm-b3be2e208cb373207d6199cac5a9fc92be073e7a.tar.bz2 matterbridge-msglm-b3be2e208cb373207d6199cac5a9fc92be073e7a.zip |
Update dependencies and vendor (#1761)
Diffstat (limited to 'vendor/github.com/slack-go/slack/webhooks_go112.go')
-rw-r--r-- | vendor/github.com/slack-go/slack/webhooks_go112.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/github.com/slack-go/slack/webhooks_go112.go b/vendor/github.com/slack-go/slack/webhooks_go112.go index 4e0db0e4..0eb539ac 100644 --- a/vendor/github.com/slack-go/slack/webhooks_go112.go +++ b/vendor/github.com/slack-go/slack/webhooks_go112.go @@ -1,3 +1,4 @@ +//go:build !go1.13 // +build !go1.13 package slack @@ -6,27 +7,26 @@ import ( "bytes" "context" "encoding/json" + "fmt" "net/http" - - "github.com/pkg/errors" ) func PostWebhookCustomHTTPContext(ctx context.Context, url string, httpClient *http.Client, msg *WebhookMessage) error { raw, err := json.Marshal(msg) if err != nil { - return errors.Wrap(err, "marshal failed") + return fmt.Errorf("marshal failed: %v", err) } req, err := http.NewRequest(http.MethodPost, url, bytes.NewReader(raw)) if err != nil { - return errors.Wrap(err, "failed new request") + return fmt.Errorf("failed new request: %v", err) } req = req.WithContext(ctx) req.Header.Set("Content-Type", "application/json") resp, err := httpClient.Do(req) if err != nil { - return errors.Wrap(err, "failed to post webhook") + return fmt.Errorf("failed to post webhook: %v", err) } defer resp.Body.Close() |