Move controller and page to new package.
This commit is contained in:
parent
c48f6bb9f4
commit
4e2f186dad
11 changed files with 29 additions and 18 deletions
|
|
@ -3,11 +3,13 @@ package controllers
|
|||
import (
|
||||
"net/http"
|
||||
|
||||
"goweb/controller"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
type Error struct {
|
||||
Controller
|
||||
controller.Controller
|
||||
}
|
||||
|
||||
func (e *Error) Get(err error, c echo.Context) {
|
||||
|
|
@ -26,7 +28,7 @@ func (e *Error) Get(err error, c echo.Context) {
|
|||
c.Logger().Info(err)
|
||||
}
|
||||
|
||||
p := NewPage(c)
|
||||
p := controller.NewPage(c)
|
||||
p.Layout = "main"
|
||||
p.Title = http.StatusText(code)
|
||||
p.Name = "error"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue