fixed careless mistakes
This commit is contained in:
parent
41be481497
commit
f0cbc1785f
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue