webassets

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package webassets embeds the built SvelteKit static SPA so the single Go binary serves both the API and the UI. The real build artifacts under dist/ are generated by `make web-embed` (which syncs web/build/ into dist/) and are gitignored; only a placeholder dist/index.html is committed so `go build` and the test suite always compile even without a fresh SPA build.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FS

func FS() (fs.FS, error)

FS returns the embedded SPA rooted at dist/ (so "index.html" and "_app/..." resolve directly). It never returns nil on success — an empty tree still yields a usable fs.FS.

func IsPlaceholder

func IsPlaceholder(fsys fs.FS) bool

IsPlaceholder reports whether the embedded SPA is only the committed placeholder (i.e. `make web-embed` was never run). Callers can warn on boot so a placeholder UI is never mistaken for a real one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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