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

webstatic

package
v0.20.9 Latest Latest
Warning

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

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

Documentation

Overview

Package webstatic serves the browser assets embedded in the openrun binary which are shared by every app on the server: the htmx runtime, the <log-tail> streaming log viewer, the action UI scripts (actions.js, json.js) and stylesheets, and the brand fonts. They are served at URLPrefix with content-hashed file names and immutable caching, so one download is cached for all apps on a server, and the same URL works on every app domain. The route needs no authentication (no user data), and is mounted outside the transport-gated management API so it is available over plain HTTP too

Index

Constants

View Source
const URLPrefix = "/_openrun/static"

URLPrefix is the server route the shared assets are served under

Variables

View Source
var FS = hashfs.NewFS(mustSub(embedded, "static"))

FS is the hashed view of the embedded assets, rooted at the static dir

Functions

func Handler

func Handler() http.Handler

Handler serves the shared assets; mount it at URLPrefix + "/*"

func URL

func URL(name string) string

URL returns the content-hashed URL of a shared asset, e.g. URL("logtail.js") = "/_openrun/static/logtail-<sha>.js". An unknown name is returned unhashed (the route then 404s, which surfaces the typo)

Types

This section is empty.

Jump to

Keyboard shortcuts

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