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

Allow templating when loading configs. #1004

Merged
merged 1 commit into from
Nov 8, 2022
Merged

Conversation

arnavdugar-stripe
Copy link
Contributor

Summary

Allow templating when loading configs.

Comment on lines +36 to +40
go func() {
err := configTemplate.Execute(configWriter, templateData)
configWriter.Close()
templateErr <- err
}()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you want to do this in a goroutine? My initial reaction is this should be synchronous.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh I see the example on io.Pipe

Copy link
Contributor

@mimran-stripe mimran-stripe left a comment

Choose a reason for hiding this comment

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

I think you could update the comment to be more clear as to why/how this would be used. But changes LGTM.

@arnavdugar-stripe arnavdugar-stripe merged commit 48ec7e4 into master Nov 8, 2022
@arnavdugar-stripe arnavdugar-stripe deleted the arnavdugar/config branch November 8, 2022 04:39
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