18 lines
396 B
Go
18 lines
396 B
Go
|
|
// Package webdist embeds the built frontend bundle. The Makefile copies
|
||
|
|
// ../frontend/dist into this directory before `go build` (go:embed cannot
|
||
|
|
// reach outside the module directory).
|
||
|
|
package webdist
|
||
|
|
|
||
|
|
import (
|
||
|
|
"embed"
|
||
|
|
"io/fs"
|
||
|
|
)
|
||
|
|
|
||
|
|
//go:embed all:dist
|
||
|
|
var dist embed.FS
|
||
|
|
|
||
|
|
// FS returns the frontend bundle rooted at its dist directory.
|
||
|
|
func FS() (fs.FS, error) {
|
||
|
|
return fs.Sub(dist, "dist")
|
||
|
|
}
|