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

chore(misc): minor recommendations #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tyzbit
Copy link

@tyzbit tyzbit commented Jun 11, 2024

PR not 100% intended to be merged, mostly just recommendations.

switch level {
case "debug":
switch {
case strings.EqualFold(level, "debug"):
Copy link
Contributor

Choose a reason for hiding this comment

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

I like the intention, but do we really want to allow people to write LOG_LEVEL=dEbUg?

Copy link
Owner

Choose a reason for hiding this comment

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

image

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, and "Debug" and all other permutations. My view is I'd rather avoid punishing the user for not reading the docs and completely adhering to the rules for less critical things like this. It reduces the support burden too. Ideally just supporting DEBUG or debug would be the most reasonable but EqualFold already exists and does that part too.

It does add a dependency which all else equal should be avoided but I think we can rely on "strings".

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.

3 participants