remove some unnecessary files

This commit is contained in:
mingcheng 2022-09-29 14:21:49 +08:00
parent e13b3e9539
commit ae0bdb2bd9
1 changed files with 2 additions and 1 deletions

View File

@ -38,10 +38,11 @@ func (r *_resource) Open(name string) (fs.File, error) {
// Register a new static resource which generated by ui directory
func (a *UIRouter) Register(r *gin.Engine) {
staticPath := os.Getenv("ANSWER_STATIC_PATH")
info, err := os.Stat(staticPath)
// if ANSWER_STATIC_PATH is set and not empty, ignore embed resource
if staticPath != "" {
info, err := os.Stat(staticPath)
if err != nil || !info.IsDir() {
log.Error(err)
} else {