Use consts for route names and templates.
This commit is contained in:
parent
a787d5dc7f
commit
60c8aefd49
30 changed files with 135 additions and 82 deletions
|
|
@ -9,6 +9,28 @@ import (
|
|||
"runtime"
|
||||
)
|
||||
|
||||
type (
|
||||
Layout string
|
||||
Page string
|
||||
)
|
||||
|
||||
const (
|
||||
LayoutMain Layout = "main"
|
||||
LayoutAuth Layout = "auth"
|
||||
)
|
||||
|
||||
const (
|
||||
PageAbout Page = "about"
|
||||
PageContact Page = "contact"
|
||||
PageError Page = "error"
|
||||
PageForgotPassword Page = "forgot-password"
|
||||
PageHome Page = "home"
|
||||
PageLogin Page = "login"
|
||||
PageRegister Page = "register"
|
||||
PageResetPassword Page = "reset-password"
|
||||
PageSearch Page = "search"
|
||||
)
|
||||
|
||||
//go:embed *
|
||||
var templates embed.FS
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue