mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-22 07:53:38 +01:00
Rename SendMessage to SendSlackMessage
This commit is contained in:
parent
8abcab6a8f
commit
857fe5eb8c
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user