bi/views/fs.go

19 lines
231 B
Go
Raw Permalink Normal View History

2022-01-26 16:40:50 +08:00
package views
import (
"embed"
"io/fs"
"net/http"
)
//go:embed dist
var StatisFs embed.FS
func GetFileSystem() http.FileSystem {
fsys, err := fs.Sub(StatisFs, "dist")
if err != nil {
panic(err)
}
return http.FS(fsys)
}