1
0
dwelling-radio/web/web.go

22 lines
361 B
Go
Raw Normal View History

package web
import (
"embed"
"io/fs"
"net/http"
)
//go:generate /home/arav/go/bin/jade -pkg=web -writer templates/index.jade
//go:embed assets
var assetsDir embed.FS
func Assets() http.FileSystem {
f, _ := fs.Sub(assetsDir, "assets")
return http.FS(f)
}
func AssetsGetFile(path string) ([]byte, error) {
return assetsDir.ReadFile("assets/" + path)
}