feat: initialize template
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
//go:generate go tool templ generate
|
||||
package web
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"io/fs"
|
||||
)
|
||||
|
||||
//go:embed static/*
|
||||
var Static embed.FS
|
||||
|
||||
func GetStaticFS() fs.FS {
|
||||
// fs.Sub returns an fs.FS corresponding to the subtree rooted at "static"
|
||||
f, err := fs.Sub(Static, "static")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return f
|
||||
}
|
||||
Reference in New Issue
Block a user