// Package config loads and validates typed configuration files using viper and // go-playground/validator. // // # Workflow // // Define a struct with mapstructure and validate tags, create a [Manager] with // [NewManager], optionally configure hooks via [Manager.WithOpts], then call // [Manager.Load] during startup. Use [Manager.C] or [Manager.Config] for quick // access after load. // // # Environment overrides // // Set [ManagerOpts.EnvPrefix] or call [Manager.WithEnvOverride]. Nested keys use // dots in YAML and underscores in env vars (for example MYAPP_DATABASE_USER). // // # Root directory discovery // // [RootDir] and [MustRootDir] locate a marker file by walking up from the working // directory—useful when config lives near a repo root. package config