check / check (push) Successful in 1m52s
The architecture is no longer passed in at build time. The Buildarch variable and field are gone from main and globals, script/build no longer stamps it in with -X, and the startup and listen log lines report runtime.GOARCH under the key "arch". The Dockerfile comment and backend/README.md no longer describe an architecture being stamped in. Model: opus-5-5
28 lines
630 B
Go
28 lines
630 B
Go
// Package globals provides build-time variables injected via
|
|
// ldflags and made available through dependency injection.
|
|
package globals
|
|
|
|
import "go.uber.org/fx"
|
|
|
|
//nolint:gochecknoglobals // set from main before fx starts
|
|
var (
|
|
// Appname is the application name.
|
|
Appname string
|
|
// Version is the git version tag.
|
|
Version string
|
|
)
|
|
|
|
// Globals holds build-time metadata for the application.
|
|
type Globals struct {
|
|
Appname string
|
|
Version string
|
|
}
|
|
|
|
// New creates a Globals instance from package-level variables.
|
|
func New(_ fx.Lifecycle) (*Globals, error) {
|
|
return &Globals{
|
|
Appname: Appname,
|
|
Version: Version,
|
|
}, nil
|
|
}
|