From 51730f998d03ee48ad10897fa8dfdc861055d56f Mon Sep 17 00:00:00 2001 From: f0x Date: Thu, 8 Jul 2021 15:41:08 +0200 Subject: [PATCH] linter fixes --- internal/router/router.go | 1 - internal/router/template.go | 3 ++- internal/web/base.go | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/router/router.go b/internal/router/router.go index 0c27886d8..87a84922c 100644 --- a/internal/router/router.go +++ b/internal/router/router.go @@ -21,7 +21,6 @@ package router import ( "context" "fmt" - "html/template" "net/http" "time" diff --git a/internal/router/template.go b/internal/router/template.go index 3b81773ec..787ade799 100644 --- a/internal/router/template.go +++ b/internal/router/template.go @@ -2,6 +2,7 @@ package router import ( "fmt" + "html/template" "os" "path/filepath" @@ -27,7 +28,7 @@ func noescape(str string) template.HTML { } func loadTemplateFunctions(engine *gin.Engine) { - return r.engine.SetFuncMap(template.FuncMap{ + engine.SetFuncMap(template.FuncMap{ "noescape": noescape, }) } diff --git a/internal/web/base.go b/internal/web/base.go index b1784ce89..9eea4a6ef 100644 --- a/internal/web/base.go +++ b/internal/web/base.go @@ -20,7 +20,6 @@ package web import ( "fmt" - "html/template" "net/http" "os" "path/filepath"