Rename SendMessage to SendSlackMessage

This commit is contained in:
TwinProduction 2020-08-19 19:40:00 -04:00
parent 8abcab6a8f
commit 857fe5eb8c

View File

@ -12,8 +12,8 @@ type requestBody struct {
Text string `json:"text"` Text string `json:"text"`
} }
// SendMessage sends a message to the given Slack webhook // SendSlackMessage sends a message to the given Slack webhook
func SendMessage(webhookUrl, msg string) error { func SendSlackMessage(webhookUrl, msg string) error {
body, _ := json.Marshal(requestBody{Text: msg}) body, _ := json.Marshal(requestBody{Text: msg})
response, err := client.GetHttpClient().Post(webhookUrl, "application/json", bytes.NewBuffer(body)) response, err := client.GetHttpClient().Post(webhookUrl, "application/json", bytes.NewBuffer(body))
if err != nil { if err != nil {