package lib import ( "bytes" "encoding/json" "net/http" ) type DiscordSender struct { Config Config } func (d DiscordSender) Send(msg string) { b, _ := json.Marshal(map[string]string{"content": msg}) if d.Config.DiscordFake { return } http.Post(d.Config.DiscordWebhook, "application/json", bytes.NewBuffer(b)) }