assets

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Resolver)

Option configures the resolver.

func WithDevMode

func WithDevMode(enabled bool) Option

WithDevMode disables caching to pick up asset changes.

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver adds fingerprint query params for static assets.

func NewResolver

func NewResolver(root string, options ...Option) *Resolver

NewResolver creates a resolver rooted at a directory.

func (*Resolver) Func

func (r *Resolver) Func() func(string) string

Func returns a template helper function.

func (*Resolver) Resolve

func (r *Resolver) Resolve(assetPath string) string

Resolve returns a path with a cache-busting fingerprint.

Jump to

Keyboard shortcuts

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