Files
webhooker/internal/globals/globals.go
sneak 94ee42fa73
Some checks failed
check / check (push) Failing after 2m8s
Acceptance probe: restore globals.go, keep broken test
2026-08-12 10:24:46 +00:00

35 lines
703 B
Go

// Package globals provides build-time variables injected via ldflags.
package globals
import (
"go.uber.org/fx"
)
// Build-time variables populated from main() and copied into the
// Globals object.
//
//nolint:gochecknoglobals // Build-time variables set by main().
var (
Appname string
Version string
)
// Globals holds build-time metadata about the application.
type Globals struct {
Appname string
Version string
}
// New creates a Globals instance from the package-level
// build-time variables.
//
//nolint:revive // lc parameter is required by fx even if unused.
func New(lc fx.Lifecycle) (*Globals, error) {
n := &Globals{
Appname: Appname,
Version: Version,
}
return n, nil
}