From b3be2e208cb373207d6199cac5a9fc92be073e7a Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 12 Mar 2022 19:41:07 +0100 Subject: Update dependencies and vendor (#1761) --- vendor/github.com/slack-go/slack/webhooks_go113.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'vendor/github.com/slack-go/slack/webhooks_go113.go') 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() -- cgit v1.2.3