// Package globals provides shared global state for the application. package globals import ( "time" "go.uber.org/fx" ) var ( // Appname is the global application name. Appname string //nolint:gochecknoglobals // Version is the global application version. Version string //nolint:gochecknoglobals ) // Globals holds application-wide metadata. type Globals struct { Appname string Version string StartTime time.Time } // New creates a new Globals instance from the global state. func New(_ fx.Lifecycle) (*Globals, error) { result := &Globals{ Appname: Appname, Version: Version, StartTime: time.Now(), } return result, nil }