//go:build !embedspa // spa_stub.go — the default build has no SPA embedded (so `go build`/`go test` // don't need ui/dist). Build with `-tags embedspa` after building the SPA to // serve the real UI (see spa_embed.go). package main import "net/http" func (s *server) spaHandler() http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "text/plain; charset=utf-8") w.WriteHeader(http.StatusNotFound) _, _ = w.Write([]byte("fleet-manager: SPA not embedded in this build.\n" + "Build with: (cd ui && npm ci && npm run build) then `go build -tags embedspa`.\n")) }) }