backup-notify/ntfy/publisher.go
Elizabeth Hunt 9d96d1a942
All checks were successful
continuous-integration/drone/push Build is passing
notify when we don't receive a thing in the last 24 hours
2024-04-21 21:14:58 -07:00

17 lines
293 B
Go

package ntfy
import (
"net/http"
"strings"
)
func SendMessage(message string, endpoint string, topics []string) error {
for _, topic := range topics {
_, err := http.Post(endpoint+"/"+topic, "text/plain", strings.NewReader(message))
if err != nil {
return err
}
}
return nil
}