web

package
v0.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2026 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package web embeds the built Svelte UI (web/dist) into the graywolf binary. Phase 3 ships a placeholder index.html; Phase 6 replaces the dist/ contents with the real Svelte+Chonky build output. The embed pattern means `go build` always produces a self-contained binary regardless of whether `npm run build` has been executed — the dist directory must exist with at least a placeholder index.html.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FS

func FS() fs.FS

FS returns an fs.FS rooted at dist/ so callers can serve files without the "dist/" path prefix.

func Handler

func Handler() http.Handler

Handler returns an http.Handler that serves the embedded UI with index.html as the default document. Unknown paths fall through to 404 rather than SPA-rewriting.

func SPAHandler

func SPAHandler() http.Handler

SPAHandler returns an http.Handler that serves static assets from the embedded dist/ and falls back to index.html for unmatched paths. This enables client-side routing in the Svelte SPA.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL