Files
chat/internal/globals/globals.go

31 lines
585 B
Go

// Package globals provides shared global state for the application.
package globals
import (
"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
}
// New creates a new Globals instance from the global state.
func New(_ fx.Lifecycle) (*Globals, error) {
n := &Globals{
Appname: Appname,
Version: Version,
}
return n, nil
}