fixed careless mistakes

This commit is contained in:
an 2018-04-22 11:44:41 +02:00
parent 41be481497
commit f0cbc1785f
1 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ func init() {
func webhookRun() {
xlog.Info("webhook listener started")
http.HandleFunc("/webhook", webhookHandleHTTP)
xlog.Fatal(http.ListenAndServe(":"+*webhookPort, nil))
xlog.Fatal("%v", http.ListenAndServe(":"+*webhookPort, nil))
}
func webhookHandleHTTP(w http.ResponseWriter, r *http.Request) {
@ -38,7 +38,7 @@ func webhookHandleHTTP(w http.ResponseWriter, r *http.Request) {
for k, v := range data {
fmt.Printf("%s : %v\n", k, v)
if k == "text" {
sayCh <- *webhookChan + "\n" + v
SayCh <- fmt.Printf("%s\n%v", *webhookChan, v)
}
}
}