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

Fix regression in env-load subcommand #1062

Merged
merged 2 commits into from
Mar 23, 2017
Merged

Fix regression in env-load subcommand #1062

merged 2 commits into from
Mar 23, 2017

Conversation

ejholmes
Copy link
Contributor

@ejholmes ejholmes commented Mar 22, 2017

Fixes #1061

This fixes an issue where env-load behaved inconsistently, where keys
would be set to random values. The behavior is best described by
https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables,
which states that it's a mistake to use a pointer in a range loop
without first copying it.

I feel like this is something that should be caught by go vet, but isn't.

This fixes an issue where env-load behaved inconsistently, where keys
would be set to random values. The behavior is best described by
https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables,
which states that it's a mistake to use a pointer in a `range` loop
without first copying it.
@ejholmes ejholmes merged commit 2d66fe0 into master Mar 23, 2017
@ejholmes ejholmes deleted the issue-1061 branch March 23, 2017 04:20
@ejholmes ejholmes mentioned this pull request Sep 19, 2017
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.

Environment variable loading broken in 0.12.0 emp client
2 participants