You've already forked htmluibuild
mirror of
https://github.com/kopia/htmluibuild.git
synced 2026-02-02 12:53:46 -08:00
21 lines
318 B
Go
21 lines
318 B
Go
package htmluibuild
|
|
|
|
import (
|
|
"embed"
|
|
"io/fs"
|
|
"net/http"
|
|
)
|
|
|
|
//go:embed build
|
|
var data embed.FS
|
|
|
|
// AssetFile return a http.FileSystem instance that data backend by asset.
|
|
func AssetFile() http.FileSystem {
|
|
f, err := fs.Sub(data, "build")
|
|
if err != nil {
|
|
panic("could not embed htmlui")
|
|
}
|
|
|
|
return http.FS(f)
|
|
}
|