2021-10-28 12:46:42 -07:00
|
|
|
package host_plugin_assets
|
2021-10-14 11:56:08 -04:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"embed"
|
|
|
|
|
"io/fs"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const contentDir = "assets"
|
|
|
|
|
|
|
|
|
|
// content is our static web server content.
|
|
|
|
|
//go:embed assets
|
|
|
|
|
var content embed.FS
|
|
|
|
|
|
|
|
|
|
func FileSystem() fs.FS {
|
|
|
|
|
// Remove the root
|
|
|
|
|
f, err := fs.Sub(content, contentDir)
|
|
|
|
|
if err != nil {
|
|
|
|
|
panic(err)
|
|
|
|
|
}
|
|
|
|
|
return f
|
|
|
|
|
}
|