fixed go.rice issue
This commit is contained in:
parent
452beba83d
commit
271974e98f
2 changed files with 2 additions and 7 deletions
|
@ -98,7 +98,5 @@ func (s *Slack) send(msg string, fallback string, color string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
go sendJson(s.WebhookUrl, payload, nil)
|
return sendJson(s.WebhookUrl, payload, nil)
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,13 +125,10 @@ func main() {
|
||||||
pub = pubsub.NewPubSub()
|
pub = pubsub.NewPubSub()
|
||||||
|
|
||||||
// create handler for static resources
|
// create handler for static resources
|
||||||
assets := rice.MustFindBox("app").HTTPBox()
|
|
||||||
assetserve := http.FileServer(rice.MustFindBox("app").HTTPBox())
|
assetserve := http.FileServer(rice.MustFindBox("app").HTTPBox())
|
||||||
http.Handle("/robots.txt", assetserve)
|
http.Handle("/robots.txt", assetserve)
|
||||||
|
http.Handle("/", assetserve)
|
||||||
http.Handle("/static/", http.StripPrefix("/static", assetserve))
|
http.Handle("/static/", http.StripPrefix("/static", assetserve))
|
||||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
|
||||||
w.Write(assets.MustBytes("index.html"))
|
|
||||||
})
|
|
||||||
|
|
||||||
// create the router and add middleware
|
// create the router and add middleware
|
||||||
mux := router.New()
|
mux := router.New()
|
||||||
|
|
Loading…
Reference in a new issue