router.go 400 B

1234567891011121314151617
  1. package main
  2. func (g *goDash) setupRouter() {
  3. g.router.GET("/", g.index)
  4. g.router.GET("/ws", g.ws)
  5. g.router.GET("/robots.txt", robots)
  6. static := g.router.Group("/static")
  7. static.Use(longCacheLifetime)
  8. static.Static("/", "static")
  9. storage := g.router.Group("/storage")
  10. storage.Use(longCacheLifetime)
  11. storage.Static("/icons", "storage/icons")
  12. g.router.RouteNotFound("/*", redirectHome)
  13. }