web

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package web serves the editor.

The built assets are compiled into the binary. There is no static directory to mount, no sidecar to serve files, and no chance of the UI and the runtime drifting apart in a container — which is the failure mode of every app whose chart mounts its frontend from somewhere else.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assets

func Assets() (fs.FS, bool)

Assets returns the editor's file system, and whether a real build is present.

A binary built without running the editor build still starts and still serves the API; it just has no UI. Reporting that explicitly beats serving a blank page and letting somebody debug their proxy for an hour.

func Handler

func Handler(prefix string) http.Handler

Handler serves the editor under the given prefix.

Unknown paths fall back to index.html so client-side routing works, but only for requests that look like navigation. A missing .js or .css must still 404, or a typo in an asset path returns HTML with a 200 and the browser reports a baffling MIME type error instead of a missing file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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