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

webui

package
v2.6.1 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: 9 Imported by: 0

Documentation

Overview

Package webui carries the X-Ray web UI inside the binary and serves it.

The UI is a Next.js static export (ui/). "make ui" builds it and stages the result in web/, which //go:embed compiles into the binary; web/.gitkeep keeps the directive compiling on a checkout where the UI has not been built, and Assets reports that case so the server simply serves no UI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assets

func Assets() (fs.FS, bool)

Assets returns the embedded export, or false when the binary was built without one.

func Handler

func Handler(root fs.FS) http.Handler

Handler serves the export with Next.js resolution order: the exact path, then <path>.html (export route files, such as /login and /k/events), then <path>/index.html, then index.html for a client-side route that has no file of its own. Each HTML document is served with a script-src naming exactly its own inline scripts, since a static export cannot carry a per-request nonce.

Types

This section is empty.

Jump to

Keyboard shortcuts

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