Help us shape the future of Go! Take the 2026 Go Developer Survey

ui

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package ui serves the Karakoram single-page web application.

The compiled SPA (built by `npm run build` in ./ui, which writes to internal/ui/dist) is embedded into the binary when Go is invoked with the `ui` build tag. Without the tag the package still compiles and the handler serves a minimal "UI not built" page, so server builds and tests never depend on a Node toolchain.

Index

Constants

View Source
const Built = false

Built reports whether the SPA is compiled into this binary.

Variables

This section is empty.

Functions

func Assets

func Assets() fs.FS

Assets returns the embedded SPA files (index.html at the root) or nil when the binary was built without the `ui` tag.

func Handler

func Handler() http.Handler

Handler returns an http.Handler serving the SPA with history-API fallback: unknown paths without a file extension return index.html so client-side routes deep-link correctly. Hashed build assets under /assets/ are served as immutable; everything else (notably index.html) is revalidated on every request so deploys take effect immediately.

Types

This section is empty.

Jump to

Keyboard shortcuts

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