vendorjs

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package vendorjs owns the third-party client scripts Gothic used to load from a public CDN (unpkg): HTMX and the amz-content-sha256 HTMX extension. They are embedded here and served from the framework's own /_gothic/ route (via runtimeassets) instead of a render-blocking cross-origin <script>, so the browser never pays a third-party DNS/TLS/connection cost on the critical path and the scripts inherit the framework's immutable cache + on-the-wire compression.

Each asset exposes a content hash (Version) used as the ?v= cache-buster in the URL the layout references, matching the convention used by gothiccore/corewasm. Bumping the pinned upstream file (recopying the min.js) changes the bytes → changes the hash → busts the browser cache automatically.

It is a LEAF package (no internal deps) so both the runtime-asset registry and the components layer can import it without forming a cycle.

Index

Constants

View Source
const (
	HtmxFileName   = "htmx.min.js"
	AmzExtFileName = "amz-content-sha256.min.js"
)

Emitted basenames served under /_gothic/.

Variables

This section is empty.

Functions

func AmzExtJS

func AmzExtJS() []byte

AmzExtJS returns the embedded amz-content-sha256 extension bytes. Served from /_gothic/.

func AmzExtVersion

func AmzExtVersion() string

AmzExtVersion returns the amz extension's content hash — its ?v= cache-buster.

func HtmxJS

func HtmxJS() []byte

HtmxJS returns the embedded HTMX bytes. Served from /_gothic/.

func HtmxVersion

func HtmxVersion() string

HtmxVersion returns HTMX's content hash — the ?v= cache-buster the layout uses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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