chore: complete clean Agent Desk source snapshot
This commit is contained in:
19
web/embed_dev.go
Normal file
19
web/embed_dev.go
Normal file
@@ -0,0 +1,19 @@
|
||||
//go:build dev
|
||||
|
||||
package webspa
|
||||
|
||||
import (
|
||||
"io/fs"
|
||||
"os"
|
||||
)
|
||||
|
||||
var SPA fs.FS = getDevFS()
|
||||
|
||||
func getDevFS() fs.FS {
|
||||
for _, dir := range []string{"web", "../web", "../../web", "../../../web"} {
|
||||
if info, err := os.Stat(dir); err == nil && info.IsDir() {
|
||||
return os.DirFS(dir)
|
||||
}
|
||||
}
|
||||
return os.DirFS("web")
|
||||
}
|
||||
Reference in New Issue
Block a user