You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
299 B
20 lines
299 B
//go:build !dev
|
|
|
|
package main
|
|
|
|
import (
|
|
"embed"
|
|
"io/fs"
|
|
"net/http"
|
|
)
|
|
|
|
//go:embed frontend/dist
|
|
var dist embed.FS
|
|
|
|
func frontendFS() http.FileSystem {
|
|
sub, err := fs.Sub(dist, "frontend/dist")
|
|
if err != nil {
|
|
panic("embedded frontend/dist not found: " + err.Error())
|
|
}
|
|
return http.FS(sub)
|
|
}
|
|
|