webui

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package webui carries the built single-page application, or nothing.

The embed sits behind the `ui` build tag on purpose. `//go:embed dist` is a COMPILE-TIME dependency on a directory the Go toolchain cannot produce: a contributor who has never run pnpm, and every `go build ./...` / `go test ./...` in this repo, would fail on a missing directory rather than on anything to do with their change. Committing a placeholder `dist` was the alternative and is worse — a checked-in minified bundle is unreviewable, and a stale one ships silently.

So: default builds get an empty asset tree and serve the API alone (the serving rules answer 404 for the document, loudly). `go build -tags ui` embeds the real `dist`, which CI produces with `pnpm --dir web build` before it builds the binary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assets

func Assets() fs.FS

Assets is the built application, or nil when this binary was compiled without the `ui` tag. `internal/server` treats nil as "API only".

Types

This section is empty.

Jump to

Keyboard shortcuts

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