Some bug fixes:

- logging: LogToFile shadowed the package-level fileLogger, so
  IsFileLogger was always false and Shutdown never closed the file
- logging: replace IsJSONHandler's unsafe reflection into slog
  internals with a *slog.JSONHandler type check
- cli: fail if the log file can't be opened instead of silently
  logging to the terminal; return the log shutdown error from Finish
- build.sh: -X flags used the wrong module path, so the version, build
  time and commit were never stamped
This commit is contained in:
bwilliams committed 2026-10-09 17:58:48 +01:00
1 parent 399eccf2de
commit dcb714dc19
7 files changed
+24 -45

No files matched your search

+5 -5
View File
@@ -19,14 +19,14 @@ type testEmbedded struct {
type testSection struct {
testEmbedded
Str string `cfg:"str" default:"hello"`
Int int `cfg:"int" default:"-42"`
Str string `cfg:"str" default:"hello"`
Int int `cfg:"int" default:"-42"`
Int8 int8 `cfg:"int8"`
Uint uint `cfg:"uint" default:"7"`
Uint uint `cfg:"uint" default:"7"`
Uint16 uint16 `cfg:"uint16"`
Float float64 `cfg:"float" default:"1.5"`
Float float64 `cfg:"float" default:"1.5"`
Float32 float32 `cfg:"float32"`
Dur time.Duration `cfg:"dur" default:"90s"`
Dur time.Duration `cfg:"dur" default:"90s"`
When time.Time `cfg:"when"`
Slice []string `cfg:"slice"`
Inner testInner `cfg:"inner"`