static

package
v1.43.0 Latest Latest
Warning

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

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

Documentation

Overview

Package static holds the embedded web assets and their content versions. It is a leaf package so that the templates and the readiness middleware can link versioned asset URLs.

flag-icons is flag-icons 7.6.0 (MIT, flag-icons/LICENSE) from the npm tarball: the 4x3 flags, and css/flag-icons.min.css without the 1x1 (".fis") rules, whose flags are not vendored. The UI uses only the "fi fi-<cc>" classes (templates.CountryFlag).

Index

Constants

This section is empty.

Variables

FS holds the assets, served under /static/ at their names in this directory.

Functions

func URL

func URL(name string) string

URL returns the URL of the named file with its version in the v query parameter, for example /static/ui.js?v=0123456789ab. The URL changes when the content changes, so the static handler lets browsers keep a file fetched through it for a year. URL panics for a name that is not embedded, so a mistyped asset fails in tests.

func Version

func Version(name string) string

Version returns the content version of the named file, or "" when no such file is embedded.

Types

This section is empty.

Jump to

Keyboard shortcuts

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