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

webdemo

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package webdemo serves the tailcat browser app (the js/wasm build of tailcat in the web/ directory) from a distribution directory of prebuilt static files, as produced by cmd/tailcat-webdist. It is used by cmd/tailcat-web, the browser integration tests, and external servers that host the demo (such as tailcat.dev).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(dist fs.FS) (http.Handler, error)

Handler returns an HTTP handler serving the web app from dist, a filesystem containing the files built by wasmbuild.Dist: index.html at "/", app.js, wasm_exec.js, and main.wasm, the latter served precompressed (from main.wasm.zst or main.wasm.gz, if present in dist) when the client's Accept-Encoding allows.

The page's asset URLs are all relative, so the handler may be mounted under a path prefix with http.StripPrefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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