24 lines
312 B
Go
24 lines
312 B
Go
|
package fupstatic
|
||
|
|
||
|
import (
|
||
|
"embed"
|
||
|
"io/fs"
|
||
|
)
|
||
|
|
||
|
//go:embed css js
|
||
|
var static embed.FS
|
||
|
|
||
|
var Static fs.FS = newStaticFS(static)
|
||
|
|
||
|
//go:embed tmpl
|
||
|
var templates embed.FS
|
||
|
|
||
|
var Templates fs.FS = must(fs.Sub(templates, "tmpl"))
|
||
|
|
||
|
func must(fsys fs.FS, err error) fs.FS {
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
return fsys
|
||
|
}
|