Commit 44158deb authored by fredix's avatar fredix
Browse files

some fix

parent 9ed74ef1
package main
import (
"net/http"
"net/url"
"os"
"log"
)
func main() {
token := os.Getenv("PLUGIN_GOTIFYTOKEN")
endpoint := os.Getenv("PLUGIN_GOTIFYENDPOINT")
title := os.Getenv("PLUGIN_GOTIFYTITLE")
message := os.Getenv("message")
priority := os.Getenv("PLUGIN_GOTIFYPRIORITY")
resp, err := http.PostForm(endpoint + "/message?token=" + token, url.Values{"message": {message}, "title": {title}, "priority": {priority}})
if resp != nil {
resp.Body.Close()
}
if err != nil {
log.Fatalln(err)
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment