Many changes
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package webassets
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"io/fs"
|
||||
)
|
||||
|
||||
//go:embed static
|
||||
var embeddedFiles embed.FS
|
||||
|
||||
func StaticFS() fs.FS {
|
||||
return mustSub("static")
|
||||
}
|
||||
|
||||
func mustSub(dir string) fs.FS {
|
||||
sub, err := fs.Sub(embeddedFiles, dir)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return sub
|
||||
}
|
||||
Reference in New Issue
Block a user