diff options
Diffstat (limited to 'vendor/github.com/nlopes/slack/webhooks.go')
-rw-r--r-- | vendor/github.com/nlopes/slack/webhooks.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vendor/github.com/nlopes/slack/webhooks.go b/vendor/github.com/nlopes/slack/webhooks.go index 870a8d8b..3ea69ffe 100644 --- a/vendor/github.com/nlopes/slack/webhooks.go +++ b/vendor/github.com/nlopes/slack/webhooks.go @@ -1,15 +1,16 @@ package slack import ( - "github.com/pkg/errors" - "net/http" "bytes" "encoding/json" + "net/http" + + "github.com/pkg/errors" ) type WebhookMessage struct { - Text string `json:"text,omitempty"` - Attachments []Attachment `json:"attachments,omitempty"` + Text string `json:"text,omitempty"` + Attachments []Attachment `json:"attachments,omitempty"` } func PostWebhook(url string, msg *WebhookMessage) error { @@ -19,7 +20,7 @@ func PostWebhook(url string, msg *WebhookMessage) error { return errors.Wrap(err, "marshal failed") } - response, err := http.Post(url, "application/json", bytes.NewReader(raw)); + response, err := http.Post(url, "application/json", bytes.NewReader(raw)) if err != nil { return errors.Wrap(err, "failed to post webhook") |