Add reflective struct-tag config loader

Implements conf.Load to populate tagged structs from a chain of Sources
(env, .env, YAML/JSON/TOML, custom). Supports default values, slice
separators, nested structs, pointer fields, and a Validator hook.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
juancwu 2026-04-27 20:35:51 +00:00
commit c4ebd80669
15 changed files with 941 additions and 0 deletions

9
go.mod Normal file
View file

@ -0,0 +1,9 @@
module git.juancwu.dev/juancwu/conf
go 1.26.2
require (
git.juancwu.dev/juancwu/errx v0.1.0
github.com/BurntSushi/toml v1.6.0
github.com/goccy/go-yaml v1.19.2
)