Files
pixa/internal/globals/globals.go
sneak 7d0ac0a139 Remove Buildarch from ldflags, use runtime.GOARCH instead
The architecture is available at runtime via stdlib, no need to bake
it in at build time.
2026-01-08 12:38:24 -08:00

27 lines
587 B
Go

// Package globals provides application-wide constants set at build time.
package globals
import (
"go.uber.org/fx"
)
// Build-time variables populated from main() via ldflags.
var (
Appname string //nolint:gochecknoglobals // set from main
Version string //nolint:gochecknoglobals // set from main
)
// 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
}