Files
filestash/embed.go
2023-10-07 22:47:37 +11:00

25 lines
364 B
Go

package embed
import (
"embed"
"io/fs"
"net/http"
"os"
)
var (
//go:embed public
wwwPublic embed.FS
WWWPublic http.FileSystem = http.FS(os.DirFS("./public/"))
)
//go:embed server/plugin/index.go
var EmbedPluginList []byte
func init() {
if os.Getenv("DEBUG") != "true" {
fsPublic, _ := fs.Sub(wwwPublic, "public")
WWWPublic = http.FS(fsPublic)
}
}