fix: validate config after PostLoad hooks

Re-run validator after PostLoad, return errors from RootDir, and add Config
alias for C(). Hooks receive *T instead of *Manager.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 18:00:31 -07:00
parent 444b2d4cf4
commit f2b6c07ff7
9 changed files with 421 additions and 230 deletions
+3
View File
@@ -5,9 +5,11 @@ go 1.24.0
require (
github.com/go-playground/validator/v10 v10.26.0
github.com/spf13/viper v1.20.1
github.com/stretchr/testify v1.10.0
)
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.9 // indirect
github.com/go-playground/locales v0.14.1 // indirect
@@ -17,6 +19,7 @@ require (
github.com/leodido/go-urn v1.4.0 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/sagikazarmark/locafero v0.9.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect