-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support loading configuration from both YAML files and env vars #87
Open
lippserd
wants to merge
8
commits into
main
Choose a base branch
from
load-config-from-yaml-and-env
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Oct 31, 2024
-
config
: Allow matching errors returned fromValidate()
Any error returned from `Validate()` is propagated with `ErrInvalidConfiguration` attached, allowing `errors.Is()` checks on the returned errors to recognize both `ErrInvalidConfiguration` and the original errors returned from `Validate()`.
Configuration menu - View commit details
-
Copy full SHA for d24577e - Browse repository at this point
Copy the full SHA d24577eView commit details -
Introduce interface
config#Flags
This commit introduces the `Flags` interface, which provides methods related to access the configuration file path specified via command line flags. This interface will be implemented by flag structs containing a switch for the configuration file path and will serve as an argument for a future library function that combines loading configurations from YAML files and environment variables.
Configuration menu - View commit details
-
Copy full SHA for 9d179a5 - Browse repository at this point
Copy the full SHA 9d179a5View commit details -
Support loading configurations from both YAML and env
This commit adds the `config#Load` function to load configurations from both YAML files and environment variables. It handles scenarios where configurations are loaded exclusively from YAML, combined with environment variables, or entirely from environment variables if the YAML file is missing and no specific configuration file is provided via command line flags.
Configuration menu - View commit details
-
Copy full SHA for b1a510f - Browse repository at this point
Copy the full SHA b1a510fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ae27cf - Browse repository at this point
Copy the full SHA 2ae27cfView commit details -
config
: Don't use too many code refs in docsElse, they must be kept synchronized.
Configuration menu - View commit details
-
Copy full SHA for de37c59 - Browse repository at this point
Copy the full SHA de37c59View commit details -
* Remove package docs, as `Load()` already provides a fairly complete example. * Add example usage to `FromEnv()`. * Add `TLS` to example usages. * Harmonize doc blocks.
Configuration menu - View commit details
-
Copy full SHA for f6b4896 - Browse repository at this point
Copy the full SHA f6b4896View commit details -
Configuration menu - View commit details
-
Copy full SHA for 069e535 - Browse repository at this point
Copy the full SHA 069e535View commit details -
Configuration menu - View commit details
-
Copy full SHA for 79829da - Browse repository at this point
Copy the full SHA 79829daView commit details
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.