Files
abuse-registration-api-golang/internal/web/web.go
T

27 lines
583 B
Go

package web
import (
"embed"
"io/fs"
)
// Templates contains all server-rendered HTML templates.
//
//go:embed templates/index.html
var Templates embed.FS
// Assets contains every browser asset needed by the POC page.
// The production binary serves these files from memory, so the server does not
// depend on a static/ directory beside the executable.
//
//go:embed static/* static/css/* static/js/* favicon.ico
var Assets embed.FS
func StaticFS() (fs.FS, error) {
return fs.Sub(Assets, "static")
}
func Favicon() ([]byte, error) {
return Assets.ReadFile("favicon.ico")
}