Documentation ¶
Overview ¶
Package web web/build.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //go:embed all:dist Dist embed.FS DistDirFS = MustSubFS(Dist, "dist") )
Functions ¶
func MustSubFS ¶
MustSubFS creates sub FS from current filesystem or panic on failure. Panic happens when `fsRoot` contains invalid path according to `fs.ValidPath` rules.
MustSubFS is helpful when dealing with `embed.FS` because for example `//go:embed assets/images` embeds files with paths including `assets/images` as their prefix. In that case use `fs := MustSubFS(fs, "rootDirectory") to create sub fs which uses necessary prefix for directory path.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.