From 06e2f75000a7785f9fb527585a8a019523d8d7fe Mon Sep 17 00:00:00 2001 From: xing Date: Fri, 27 Jan 2023 01:03:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/theme/hook.go | 2 +- internal/theme/templateFuncs.go | 2 +- internal/theme/theme.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/theme/hook.go b/internal/theme/hook.go index 23ce9c8..3c7fa88 100644 --- a/internal/theme/hook.go +++ b/internal/theme/hook.go @@ -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") } diff --git a/internal/theme/templateFuncs.go b/internal/theme/templateFuncs.go index 2c7d0a6..b1f17c4 100644 --- a/internal/theme/templateFuncs.go +++ b/internal/theme/templateFuncs.go @@ -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") } diff --git a/internal/theme/theme.go b/internal/theme/theme.go index 67bcd78..bc0e23a 100644 --- a/internal/theme/theme.go +++ b/internal/theme/theme.go @@ -7,7 +7,7 @@ import ( ) func InitThemeAndTemplateFuncMap() { - AddThemeHookFunc(twentyseventeen.ThemeName, twentyseventeen.Hook) + addThemeHookFunc(twentyseventeen.ThemeName, twentyseventeen.Hook) } func GetTemplateName() string {