mirror of https://gitee.com/answerdev/answer.git
remove some unnecessary files
This commit is contained in:
parent
e13b3e9539
commit
ae0bdb2bd9
|
@ -38,10 +38,11 @@ func (r *_resource) Open(name string) (fs.File, error) {
|
||||||
// Register a new static resource which generated by ui directory
|
// Register a new static resource which generated by ui directory
|
||||||
func (a *UIRouter) Register(r *gin.Engine) {
|
func (a *UIRouter) Register(r *gin.Engine) {
|
||||||
staticPath := os.Getenv("ANSWER_STATIC_PATH")
|
staticPath := os.Getenv("ANSWER_STATIC_PATH")
|
||||||
info, err := os.Stat(staticPath)
|
|
||||||
|
|
||||||
// if ANSWER_STATIC_PATH is set and not empty, ignore embed resource
|
// if ANSWER_STATIC_PATH is set and not empty, ignore embed resource
|
||||||
if staticPath != "" {
|
if staticPath != "" {
|
||||||
|
info, err := os.Stat(staticPath)
|
||||||
|
|
||||||
if err != nil || !info.IsDir() {
|
if err != nil || !info.IsDir() {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue