fix: error on repeated reading `static` (#5957)

* Update static.go

* rm initial value of static

---------

Co-authored-by: Andy Hsu <i@nn.ci>
pull/5977/head
Jing 2024-01-30 21:21:53 +08:00 committed by GitHub
parent aef952ae68
commit c82866975e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -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")
}