-
Notifications
You must be signed in to change notification settings - Fork 133
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/toggle variable validation detail on dev mode for compliance #934
base: master
Are you sure you want to change the base?
Fix/toggle variable validation detail on dev mode for compliance #934
Conversation
…alidation-detail-on-dev-mode-for-compliance
@@ -87,6 +89,11 @@ const ( | |||
pathItemKindArray | |||
) | |||
|
|||
func devModeCheck() bool { | |||
d := strings.ToLower(os.Getenv("DEV_MODE")) |
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.
Can we turn this into a property on the variablesVisitor that we can pass on creation?
This way, it won't depend on env vars, etc. which makes it more universally usable.
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.
Hey @jensneuse , thanks for the suggested change. @Sam-tesouro and I were just chatting, and I'm afraid my go foo is a bit rusty so wondering how we'd pass that into the variables visitor. If you have a quick example, suggestion, or link, that'd help. We're working on it either way though. Thanks for all you do!
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.
Implemented a thing that might be what you want, possibly.
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.
I see the issue with being so coupled to the DEV_MODE env var, working on decoupling still. Biggest hangup currently is just figuring out how I am going to achieve test coverage.
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.
I can help you, need to see when I find the time.
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.
Thank you! I believe I achieved decoupling. Glad to make further modifications if you have preferences!
…ev-mode-for-compliance
…ev-mode-for-compliance
…alidation-detail-on-dev-mode-for-compliance
…ev-mode-for-compliance
…ev-mode-for-compliance
…ev-mode-for-compliance
…ev-mode-for-compliance
…ev-mode-for-compliance
…ev-mode-for-compliance
…ev-mode-for-compliance
…ev-mode-for-compliance
…ev-mode-for-compliance
…ev-mode-for-compliance
…ev-mode-for-compliance
…ev-mode-for-compliance
…ev-mode-for-compliance
per discussion at wundergraph/cosmo#1182