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

♻️ Refactor: Use EnableColors instead of DisableColors #2497

Closed
wants to merge 1 commit into from
Closed

♻️ Refactor: Use EnableColors instead of DisableColors #2497

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Jun 5, 2023

Description

In this pull request, initially, EnableColors was exported and used, but then a new a bool variable was added, which I feel like is redundant, since EnableColors already exists, and works just like the added DisableColors bool

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation - /docs/ directory for https://docs.gofiber.io/
  • New and existing unit tests pass locally with my changes

Commit formatting:

Use emojis on commit messages so it provides an easy way of identifying the purpose or intention of a commit. Check out the emoji cheatsheet here: https://gitmoji.carloscuesta.me/

Copy link
Member

@ReneWerner87 ReneWerner87 left a comment

Choose a reason for hiding this comment

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

By default all variables with datatype bool are false, so how do you manage the default value true when a consumer passes a custom config and does not explicitly enable coloring

Therefore we mostly use switches that are rotated when the default value is "enabled".

@ghost
Copy link
Author

ghost commented Jun 5, 2023

Ah, I see, thank you for the clarification! @ReneWerner87
I'll close the PR.

@ghost ghost closed this Jun 5, 2023
This pull request was closed.
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.

1 participant