d8e0a13aae
* update gofumpt to 0.3.1 and reformat the repo * output the version of the formatter we're using
26 lines
442 B
Go
26 lines
442 B
Go
//go:build ui
|
|
|
|
package http
|
|
|
|
import (
|
|
"embed"
|
|
"io/fs"
|
|
"net/http"
|
|
)
|
|
|
|
// content is our static web server content.
|
|
//
|
|
//go:embed web_ui/*
|
|
var content embed.FS
|
|
|
|
// assetFS is a http Filesystem that serves the generated web UI from the
|
|
// "ember-dist" make step
|
|
func assetFS() http.FileSystem {
|
|
// sub out to web_ui, where the generated content lives
|
|
f, err := fs.Sub(content, "web_ui")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return http.FS(f)
|
|
}
|