Skip to content

v0.19.0: refactor(config): restructure config loaders to return typed structs

Choose a tag to compare

@lesichkovm lesichkovm released this 09 Apr 03:49
· 388 commits to main since this release
- Replace config loader functions to return domain-specific structs instead of calling setter methods
- Remove load.go and defaults.go files, consolidating initialization logic into NewFromEnv()
- Update appConfig() to return appSettings struct with all app configuration fields
- Update authConfig() to return authSettings struct
- Update databaseConfig() to return databaseSettings struct
- Update emailConfig() to return emailSettings struct
- Update storesConfig() to return storesSettings struct
- Update paymentConfig() to return paymentSettings struct
- Update llmConfig() to return llmSettings struct
- Update i18nConfig() to return i18nSettings struct
- Implement NewFromEnv() constructor to orchestrate config loading with proper initialization order
- Handle encryption key initialization before loading encrypted environment variables
- Update main.go to call NewFromEnv() instead of Load()
- Remove edit boundary comments from config loader functions
- Simplify config loaders by removing direct cfg parameter dependency