gohttpserver/internal/globals/globals.go
Jeffrey Paul dd778174a7
Some checks failed
continuous-integration/drone/push Build is failing
sneak/integrate-di (#17)
moving this to use uber/fx di framework instead of the ad hoc di setup before

Co-authored-by: sneak <sneak@sneak.berlin>
Reviewed-on: #17
2023-01-29 03:06:05 +00:00

28 lines
410 B
Go

package globals
import (
"go.uber.org/fx"
)
// these get populated from main() and copied into the Globals object.
var (
Appname string
Version string
Buildarch string
)
type Globals struct {
Appname string
Version string
Buildarch string
}
func New(lc fx.Lifecycle) (*Globals, error) {
n := &Globals{
Appname: Appname,
Buildarch: Buildarch,
Version: Version,
}
return n, nil
}