Skip to content
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 bash like interpolate #4

Merged
merged 5 commits into from
Jul 18, 2022

Conversation

k2tzumi
Copy link
Collaborator

@k2tzumi k2tzumi commented Jul 16, 2022

Proposal

I want to be able to specify default values when expanding environment variables.

  • Example
${UNDEFINED_VAR:-default}

If UNDEFINED_VAR is unset or NULL, default is expanded; otherwise, the value of UNDEFINED_VAR is assigned.

Contents of Proposal

Delegate processing from os.Expand to github.com/buildkite/interpolate.

@@ -14,7 +14,7 @@ lint:
depsdev:
go install github.com/Songmu/ghch/cmd/[email protected]
go install github.com/Songmu/gocredits/cmd/[email protected]
go install github.com/securego/gosec/v2/cmd/gosec@v2.8.1
go install github.com/securego/gosec/v2/cmd/gosec@v2.11.0
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

CI failed, so I fixed it with the following
securego/gosec#797

@k1LoW
Copy link
Owner

k1LoW commented Jul 18, 2022

@k2tzumi GREAT!!! THANK YOU!!

@k1LoW k1LoW merged commit 246b264 into k1LoW:main Jul 18, 2022
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