phoneassistant/ntfy/publisher.go
Elizabeth Hunt 18a945aab9
Some checks failed
continuous-integration/drone/push Build is failing
initial commit by simponic-infra
2025-01-12 23:09:34 -08: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
}