Skip to content

Conversation

svyatogor
Copy link

In some cases we want to pass env variables that might not be present in AWS SSM Param store but could be added later. This flag lets you ignore such variables and unset them in the environment.

//
// NewReplacer will panic if envValuePrefix is the empty string.
func NewReplacer(envValuePrefix string, ssm ParamsGetter) *Replacer {
func NewReplacer(envValuePrefix string, unsetNotFound bool, ssm ParamsGetter) *Replacer {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes the function signature, and thus would represent a breaking change. We could instead just expose UnsetNotFound on the Replacer struct, so that it can be set to true after calling NewReplacer; adding new fields to a struct is not considered a breaking change by the Go community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants