Self-contained HTTP/HTTPS/TCP/UDP reverse proxy manager written in Go, with SQLite storage, a Bootstrap 5 admin UI (Go templates, no JS framework), and a REST API under /api/v1. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QTXFrNP1imCW7jtfL5SZrw
26 lines
529 B
Go
26 lines
529 B
Go
// Package web serves the server-rendered Bootstrap 5 admin UI: Go
|
|
// templates plus vanilla JS/CSS, all embedded into the binary. No
|
|
// frontend framework is used.
|
|
package web
|
|
|
|
import (
|
|
"embed"
|
|
"io/fs"
|
|
)
|
|
|
|
//go:embed all:templates
|
|
var templatesFS embed.FS
|
|
|
|
//go:embed all:static
|
|
var staticFSRaw embed.FS
|
|
|
|
// StaticFS returns the embedded static assets rooted at "static/..." so
|
|
// they can be served at /static/.
|
|
func StaticFS() fs.FS {
|
|
sub, err := fs.Sub(staticFSRaw, "static")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return sub
|
|
}
|