From c82866975e96a8fe016c5a8e280201573724cbae Mon Sep 17 00:00:00 2001 From: Jing <42014615+jing332@users.noreply.github.com> Date: Tue, 30 Jan 2024 21:21:53 +0800 Subject: [PATCH] fix: error on repeated reading `static` (#5957) * Update static.go * rm initial value of static --------- Co-authored-by: Andy Hsu --- server/static/static.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/static/static.go b/server/static/static.go index 8e2054af7f9..cb5109952f4 100644 --- a/server/static/static.go +++ b/server/static/static.go @@ -16,11 +16,11 @@ import ( "github.com/gin-gonic/gin" ) -var static fs.FS = public.Public +var static fs.FS func initStatic() { if conf.Conf.DistDir == "" { - dist, err := fs.Sub(static, "dist") + dist, err := fs.Sub(public.Public, "dist") if err != nil { utils.Log.Fatalf("failed to read dist dir") }