-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Use envconfig fork to abstract os package #2337
Conversation
815bd60
to
51bd176
Compare
I didn't use
Luckily, the changes for the most part are pretty small ... so that isn't really a problem. The two other problems with envconfig seem to be more hairy so at least for now I don't plan on fixing them, but I am taking PRs :P |
Previous to this the envconfig package directly called os.LookupEnv. With this it also takes a function that can replace this call giving us the ability to not use for example map[string]string for the backing instead of having to touch the global environment in tests.
51bd176
to
e03b936
Compare
This is the actual envconfig change for which it was forked. It's backwards compatible on purpose, but we can change that if we decide in the future. The only other change is renaming the module. |
Co-authored-by: na-- <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! One step closer...
@mstoykov test-tip failed here: https://github.com/grafana/k6/runs/4938790631 ? That's not the flaky one it seems 😕 |
It is, it just fails really rarely. |
Previous to this the envconfig package directly called os.LookupEnv.
With this it also takes a function that can replace this call giving us
the ability to not use for example map[string]string for the backing
instead of having to touch the global environment in tests.