Skip to content

Commit

Permalink
fix: error on repeated reading static (#5957)
Browse files Browse the repository at this point in the history
* Update static.go

* rm initial value of static

---------

Co-authored-by: Andy Hsu <[email protected]>
  • Loading branch information
jing332 and xhofe authored Jan 30, 2024
1 parent aef952a commit c828669
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/static/static.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit c828669

Please sign in to comment.