-
Notifications
You must be signed in to change notification settings - Fork 63
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
Implemented use of 3 variables instead of a single #18
base: master
Are you sure you want to change the base?
Conversation
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.
Added a few additional comments regarding variable name and comment changes. They seem like lateral moves in terms of code clarity, so I don't think they're worth causing merge conflicts down the road.
I really like this change, but I would implement it a little differently. You mentioned that you're relatively new to golang and that you're interested in learning idioms / common patterns. I can write a brief implementation in the go playground with some explanations as to why I've made certain design decisions if you're open to that. |
@subtlepseudonym I would be stupid not to take you up on that offer I will adjust the PR to focus on the proposed functional change and not so much on my boy scout merrits |
The PR is not solely focused on the splitting of the single environment variable into three |
Here's a write up in the go playground of how I was thinking about this change. Let me know if anything is unclear or if I've under- or over-explained anything. Additionally, after hacking away at this example for a little while I 100% see the value in the variable name changes (fail, pass, skip) and I apologize for bikeshedding. If you open a separate PR with those changes, I'll approve them. |
I am currently in the process of evaluating your suggestions and I have made a separate PR for the variable name changes, please see RP #23. I can see in the PlayGround write up that you are suggesting working with 3 parameters for the existing use of the environment variable, this is not currently implemented in master, which leads me to - did you see my PR #17, which addresses exactly this? I really like the possibility of backwards compatibility, so my suggested implementation in PR #17 does not require 3 parameters and the logic is: if len(vals) > 3 { Around line 135. Instead of: if len(vals) != 3 { As suggested in the PlayGround What do you think would be the best approach? |
Based on my comments about the comparison, I revisited PR #17 Did some more testing and updated the documentation. My recommendation is still for |
I did see #17 and likely implemented |
Updated from master with the latest releases, conflicts resolved |
…erhaul, please see the other PRs with documentation changes.
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.
Two minor suggestions, otherwise looks good!
All 3 parameters mentioned Co-authored-by: Connor <[email protected]>
Co-authored-by: Connor <[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.
good
Hi @rakyll
I was pondering about my PR #17 and the fact that I work as a product manager as my day job won. The use-case of the
GOTEST_PALETTE
is not optimal.So this PR offers an alternative approach. I have however only done the code, not the documentation, but I wanted to now what you think of the approach, before spending too much time on the PR.
The change is splitting the
GOTEST_PALETTE
into 3 separate environment variables and configurable parameters:GOTEST_FAIL_COLOR
GOTEST_PASS_COLOR
GOTEST_SKIP_COLOR
The last one, where the use-case originates from my PR #17.
You could keep the
GOTEST_PALETTE
for backwards compatibility and even apply PR #17 but I think a split as suggested in this PR is a better approach.Let me know what you think - and if you wanted to evaluate a documentation update, with the code change please let me know.
As I mentioned in PR #17 I am fairly new to Go so if there are code, which could be more idiomatic or something, please let me know.
And I hope it is okay I renamed a few things to keep it more lean.