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 ¶
var FS embed.FS
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 ¶
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.