Develop#2
Merged
ralvescosta merged 7 commits intomainfrom May 25, 2025
Merged
Conversation
…rom Configs struct
…tings, and refactor existing configs
…ings and removing deprecated metrics and tracing configurations
…bitMQ configurations
… add marshaling/unmarshaling methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant changes to the configuration system, enhancing environment variable support, improving type safety, and removing unused or redundant configurations. Key updates include transitioning fields to use
mapstructureandenvconfigtags, replacing integer-based enums with string-based enums, and adding comprehensive tests for configuration loading. Additionally, some unused configuration structs have been removed.Enhancements to configuration structures:
AppConfigsto include new fields (Namespace,Host,Port) and addedmapstructureandenvconfigtags for environment variable binding. ([app.goR11-R54](https://github.com/goxkit/configs/pull/2/files#diff-6c4b6ed7dc8834cef100f50dae61c30ffe7775a3f3f6f5a557517cb740c44a2dR11-R54))EnvironmentandLogLevelto improve readability and type safety. ([[1]](https://github.com/goxkit/configs/pull/2/files#diff-91eb70f1e3dac1f0e5c0a6e789ade926700e4500eadc5304502322b5ace008dfR7-R25),[[2]](https://github.com/goxkit/configs/pull/2/files#diff-b6729dc94d8e7b958d4bfab37dca16bf8d2cf32ca079547b21f91ce78b8d6776L9-R21))AWSConfigs,IdentityConfigs, andKafkaConfigsto support environment variable bindings usingmapstructureandenvconfigtags. ([[1]](https://github.com/goxkit/configs/pull/2/files#diff-154b151b1a93f1cf611c8e2218f9aa40ccb227bae87071be7f82237e1c4649d3R10-R38),[[2]](https://github.com/goxkit/configs/pull/2/files#diff-2de96e48bc2537386b67ba8481b1566bbc2876c46b0b36a7dfd9cadd55f3a050R10-R53),[[3]](https://github.com/goxkit/configs/pull/2/files#diff-9e1a248f742004580cd6ee82db292e4c34e950881151854a568042623929e89bR10-R55))Removal of unused configurations:
Auth0ConfigsandMetricsConfigsas they were no longer in use. ([[1]](https://github.com/goxkit/configs/pull/2/files#diff-767d67ed1ec7b4c07212bd3b1289b65977c604e8446804442e26a34f52978eceL1-L18),[[2]](https://github.com/goxkit/configs/pull/2/files#diff-368a9e52513f8700cc50c424de862c537fc5c1a492c4598b97b960f46fc1c877L1-L31))Improvements to testing:
TestAppConfigsWithViperto validate configuration loading from.env.localfiles and ensure proper handling of environment variables. ([app_test.goR1-R124](https://github.com/goxkit/configs/pull/2/files#diff-65409e14d57dfeeef8ef8a499ca2eb193731e4a33b6ae6a83fc83eebef4e015eR1-R124))Structural changes:
zap.SugaredLoggerwithzap.LoggerinConfigsfor better logging performance. ([configs.goL17-R17](https://github.com/goxkit/configs/pull/2/files#diff-c4ae2ab10cb4bf7482e3ad3e932a053820c7c06838bcc5498b1cf2847328544dL17-R17))MetricsConfigs,TracingConfigs,Auth0Configs) from theConfigsstruct and introducedOTLPConfigsandPostgresConfigs. ([configs.goL27-L36](https://github.com/goxkit/configs/pull/2/files#diff-c4ae2ab10cb4bf7482e3ad3e932a053820c7c06838bcc5498b1cf2847328544dL27-L36))Minor updates:
go.modto use Go version 1.24.3. ([go.modL3-R3](https://github.com/goxkit/configs/pull/2/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6L3-R3))