Files
pixa/internal/globals/globals.go
T
clawbot 8f65fd7b05
check / check (push) Failing after 2s
Move pixad's startup from cmd/pixad into internal/app (closes #206)
cmd/pixad/main.go built the command line and its --config flag, set
PIXA_CONFIG_PATH from that flag, ignored SIGPIPE and started the fx
app. REPO_POLICIES.md now requires cmd/ to hold only one call into
internal/ or pkg/, so that code moves unchanged to Run in the new
internal/app package, and main calls app.Run(Version). Version stays
in main, so the -X main.Version build flags in the Dockerfile and the
Makefile do not change.

Model: opus-5-5
2026-10-04 22:27:09 +00:00

26 lines
555 B
Go

// Package globals provides application-wide constants set at build time.
package globals
import (
"go.uber.org/fx"
)
const appname = "pixad"
// Version is set by app.Run to the version main was built with.
var Version string //nolint:gochecknoglobals // set by app.Run
// Globals holds application-wide constants.
type Globals struct {
Appname string
Version string
}
// New creates a new Globals instance from build-time variables.
func New(_ fx.Lifecycle) (*Globals, error) {
return &Globals{
Appname: appname,
Version: Version,
}, nil
}