This commit is contained in:
xing 2023-01-27 01:03:41 +08:00
parent 4e84bf21a0
commit 06e2f75000
3 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ import (
var themeMap = map[string]func(int, *gin.Context, gin.H, int, int){}
func AddThemeHookFunc(name string, fn func(int, *gin.Context, gin.H, int, int)) {
func addThemeHookFunc(name string, fn func(int, *gin.Context, gin.H, int, int)) {
if _, ok := themeMap[name]; ok {
panic("exists same name theme")
}

View File

@ -23,7 +23,7 @@ func FuncMap() template.FuncMap {
return comFn
}
func AddTemplateFunc(fnName string, fn any) {
func addTemplateFunc(fnName string, fn any) {
if _, ok := comFn[fnName]; ok {
panic("exists same name func")
}

View File

@ -7,7 +7,7 @@ import (
)
func InitThemeAndTemplateFuncMap() {
AddThemeHookFunc(twentyseventeen.ThemeName, twentyseventeen.Hook)
addThemeHookFunc(twentyseventeen.ThemeName, twentyseventeen.Hook)
}
func GetTemplateName() string {