diff options
author | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-10-19 14:17:35 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-10-19 14:17:35 +0530 |
commit | b21affc9a724d8c9d9bcbf05136bcb0128a42292 (patch) | |
tree | c37eb1fcb7b76419af0a5c93989a00e0663666c7 /main.go | |
parent | f3bf3c402a8e7b6df0c44256b55c414ef229cf87 (diff) |
Added English site and a redirect page
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -19,12 +19,20 @@ func main() { router := gin.New() router.Use(gin.Logger()) - router.LoadHTMLGlob("templates/*.html") + router.LoadHTMLGlob("templates/*") router.Static("/static", "static") - router.GET("/", func(c *gin.Context) { + router.GET("/en", func(c *gin.Context) { + c.HTML(http.StatusOK, "en.index.html", nil) + }) + + router.GET("/jp", func(c *gin.Context) { c.HTML(http.StatusOK, "jp.index.html", nil) }) + router.GET("/", func(c *gin.Context) { + c.HTML(http.StatusOK, "redirect.index.html", nil) + }) + router.Run(":" + port) } |