internal/webui carries web/'s build (written to internal/webui/dist by Vite, git-ignored) when sondad is built with -tags webui. Without the tag the app is absent and a plain go build and go test still work with no Node. main wires it into the router.
10 lines
333 B
Go
10 lines
333 B
Go
//go:build !webui
|
|
|
|
// Package webui carries the built web app inside the binary.
|
|
package webui
|
|
|
|
import "io/fs"
|
|
|
|
// FS is nil in a build without the app (no webui tag), so that a plain go build and go test
|
|
// work without building the web app first. The server then shows a page saying how to build it.
|
|
func FS() fs.FS { return nil }
|