1234567891011121314151617181920 |
- package notifybot
- import (
- "net/http"
- "net/url"
- "github.com/spf13/viper"
- )
- func NotifyMsg(msg string) {
- go func() {
- notify_token := viper.GetString("notify_token")
- if notify_token == "" {
- notify_token = "default"
- }
- reqUrl := "https://notifybot.daxia.dev:8443/notify?token=" + url.QueryEscape(notify_token) + "&msg=" + url.QueryEscape(msg)
- http.Get(reqUrl)
- }()
- }
|