| 12345678910111213141516171819 |
- package web
- import (
- "embed"
- "io/fs"
- "net/http"
- )
- //go:embed static/*
- var staticFS embed.FS
- // Handler returns an http.Handler that serves the embedded web dashboard.
- func Handler() http.Handler {
- sub, err := fs.Sub(staticFS, "static")
- if err != nil {
- panic(err)
- }
- return http.FileServer(http.FS(sub))
- }
|