fix: remove Buildarch from globals, main, Makefile, logger, and tests
All checks were successful
check / check (push) Successful in 4s
All checks were successful
check / check (push) Successful in 4s
Buildarch was erroneously included. Remove it from: - internal/globals/globals.go (struct field, package var, setter) - cmd/dnswatcher/main.go (var declaration, setter call) - Makefile (BUILDARCH var, ldflags) - internal/logger/logger.go (Identify log field) - internal/config/config_test.go (test fixture) - README.md (build command, architecture section)
This commit is contained in:
@@ -171,7 +171,7 @@ cmd/dnswatcher/main.go Entry point (uber/fx bootstrap)
|
||||
|
||||
internal/
|
||||
config/config.go Viper-based configuration
|
||||
globals/globals.go Build-time variables (version, arch)
|
||||
globals/globals.go Build-time variables (version)
|
||||
logger/logger.go slog structured logging (TTY detection)
|
||||
healthcheck/healthcheck.go Health check service
|
||||
middleware/middleware.go HTTP middleware (logging, CORS, metrics auth)
|
||||
@@ -363,11 +363,10 @@ make clean # Remove build artifacts
|
||||
|
||||
### Build-Time Variables
|
||||
|
||||
Version and architecture are injected via `-ldflags`:
|
||||
Version is injected via `-ldflags`:
|
||||
|
||||
```sh
|
||||
go build -ldflags "-X main.Version=$(git describe --tags --always) \
|
||||
-X main.Buildarch=$(go env GOARCH)" ./cmd/dnswatcher
|
||||
go build -ldflags "-X main.Version=$(git describe --tags --always)" ./cmd/dnswatcher
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user