From caac3044e5588b65b75cacf250a7fc89ea12ea74 Mon Sep 17 00:00:00 2001 From: Jonson Petard <41122242+greenhat616@users.noreply.github.com> Date: Mon, 18 Sep 2023 10:33:56 +0800 Subject: [PATCH] fix: lint issue --- consumers/start.go | 2 +- django/django.go | 4 ++-- django/embed.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/consumers/start.go b/consumers/start.go index e08d119..291cdaf 100644 --- a/consumers/start.go +++ b/consumers/start.go @@ -60,7 +60,7 @@ func handleErr(e error) { } func signalIntHandler(instance *rabbitmq.Instance) { - c := make(chan os.Signal) + c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt, syscall.SIGTERM, syscall.SIGINT) go func() { <-c diff --git a/django/django.go b/django/django.go index fa1229f..c33301a 100644 --- a/django/django.go +++ b/django/django.go @@ -15,14 +15,14 @@ var ( ) // init initializes pongo2 template loader. -// It loads templates from embededFS and local filesystem. +// It loads templates from embeddedFS and local filesystem. // It also loads globals from globalsCtxProviders. func init() { defer zap.L().Sync() var err error tplPublicDir := path.Join(must[string](executablePath), "resources/") loader, err := pongo2.NewHttpFileSystemLoader(http.FS(priorityFS{ - embededFS, + embeddedFS, os.DirFS(tplPublicDir), }), "./template") if err != nil { diff --git a/django/embed.go b/django/embed.go index daab7b8..dd3b729 100644 --- a/django/embed.go +++ b/django/embed.go @@ -2,5 +2,5 @@ package django import "embed" -//go:embed template/**/*.django template/*.django -var embededFS embed.FS +//go:embed all:template +var embeddedFS embed.FS