Archived
Template
1
0
This repository has been archived on 2023-12-20. You can view files and clone it, but cannot push or open issues or pull requests.
Files
golang-base-project/routes/noroute.go

14 lines
284 B
Go
Raw Normal View History

2021-12-12 14:56:13 +01:00
package routes
import (
"github.com/gin-gonic/gin"
"net/http"
)
// NoRoute handles rendering of the 404 page
2021-12-12 14:56:13 +01:00
func (controller Controller) NoRoute(c *gin.Context) {
2022-01-29 10:21:05 +01:00
pd := controller.DefaultPageData(c)
pd.Title = pd.Trans("404 Not Found")
2021-12-12 14:56:13 +01:00
c.HTML(http.StatusOK, "404.html", pd)
}