webvendor

package
v0.7.22 Latest Latest
Warning

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

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

Documentation

Overview

Package webvendor holds third-party browser assets shared by more than one service, vendored from npm and served alongside each service's own staticembed files.

It exists so a library used by both apigw and verifier is checked in once. Two copies drift - the verifier's used to carry an AbortSignal patch that upstream lacked - and a duplicated bundle is also counted as duplicated source by static analysis.

Index

Constants

This section is empty.

Variables

FS holds the vendored bundles. Served at /static by every service that mounts it, so a page references them the same way whichever service delivered the page.

Functions

func Overlay

func Overlay(base fs.FS) fs.FS

Overlay serves base, falling back to the shared vendored assets for any path base does not have.

Both services mount their own staticembed at /static and need the vendored bundles to appear there too. Registering a second gin StaticFS under the same prefix is not possible - the wildcard routes collide - and moving the bundles to their own URL prefix would mean every page referencing them depends on which service served it. Overlaying keeps /static/dc-api.js meaning the same thing everywhere.

base wins on conflict, so a service can still override a vendored file by shipping its own copy of that name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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