feat(infra): tipos ConfigError y ConfigValidation + funciones puras Go (validate, merge, dump)
- ConfigError y ConfigValidation como tipos producto con sus .md en types/infra/ - config_validate: validacion con tags required/format/min/max/oneof via reflection - config_merge: merge no-mutante de map[string]string con precedencia de override - config_dump: serializacion de structs a map con mascara *** para campos secret - 17 tests unitarios, todos PASS Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package infra
|
||||
|
||||
// ConfigError represents a single validation error for a configuration field.
|
||||
type ConfigError struct {
|
||||
Field string // struct field name or env var name
|
||||
Message string // human-readable error description
|
||||
Tag string // validation tag that triggered the error (e.g. "required", "format")
|
||||
}
|
||||
Reference in New Issue
Block a user