summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/slack-go/slack/webhooks_go113.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2022-03-12 19:41:07 +0100
committerGitHub <noreply@github.com>2022-03-12 19:41:07 +0100
commitb3be2e208cb373207d6199cac5a9fc92be073e7a (patch)
tree6de6d444737edee8f0476eea87c233fa980f0002 /vendor/github.com/slack-go/slack/webhooks_go113.go
parentc30e90ff3f7e9ff96ac79ed4b7d90d6346216a15 (diff)
downloadmatterbridge-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_go113.go')
-rw-r--r--vendor/github.com/slack-go/slack/webhooks_go113.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/github.com/slack-go/slack/webhooks_go113.go b/vendor/github.com/slack-go/slack/webhooks_go113.go
index 99c243f5..021eac01 100644
--- a/vendor/github.com/slack-go/slack/webhooks_go113.go
+++ b/vendor/github.com/slack-go/slack/webhooks_go113.go
@@ -1,3 +1,4 @@
+//go:build go1.13
// +build go1.13
package slack
@@ -6,26 +7,25 @@ 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: %w", err)
}
req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewReader(raw))
if err != nil {
- return errors.Wrap(err, "failed new request")
+ return fmt.Errorf("failed new request: %w", err)
}
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: %w", err)
}
defer resp.Body.Close()