Skip to content

Commit 020c844

Browse files
authored
configurable webhook url via env var
ugly, but functional; no safety included.
1 parent 2116bc8 commit 020c844

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ type discordOut struct {
4444
}
4545

4646
func main() {
47-
whURL := flag.String("webhook.url", "https://blah", "")
47+
webhookUrl := os.Getenv("webhook")
48+
whURL := flag.String("webhook.url", webhookUrl, "")
4849
flag.Parse()
4950
http.ListenAndServe("localhost:9094", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
5051
b, err := ioutil.ReadAll(r.Body)

0 commit comments

Comments
 (0)