add:not found page
This commit is contained in:
13
handlers/error.go
Normal file
13
handlers/error.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"personal-site/pages"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func NotFoundHandler(c *gin.Context) {
|
||||
c.Status(http.StatusNotFound)
|
||||
pages.ErrorPage().Render(c.Request.Context(), c.Writer)
|
||||
}
|
||||
Reference in New Issue
Block a user