feat: add color printing utilities#797
feat: add color printing utilities#797hwbrzzl merged 1 commit intogoravel:masterfrom almas-x:color-printer
Conversation
|
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Review Ready |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #797 +/- ##
==========================================
+ Coverage 69.81% 69.83% +0.02%
==========================================
Files 217 218 +1
Lines 18825 18841 +16
==========================================
+ Hits 13142 13158 +16
Misses 4969 4969
Partials 714 714 ☔ View full report in Codecov by Sentry. |
| Supported Features: | ||
| 1. Style Tags: | ||
| Use predefined style tags to format text. Example: | ||
| color.Print("<suc>he</><comment>llo</>, <cyan>wel</><red>come</>") |
There was a problem hiding this comment.
Is there a rule that describes the tags, please?
There was a problem hiding this comment.
Don't we have color.Red().Println and other methods?
There was a problem hiding this comment.
Is there a rule that describes the tags, please?
There was a problem hiding this comment.
Don't we have
color.Red().Printlnand other methods?
It’s not just about simple colors like red or green. We also need to style text with bold, italic, underline, and use a wider range of RGB colors. For this, using gookit/color with its flexible color tag configuration is highly recommended.
📑 Description
Package color provides utilities for rendering and printing colorized text using color tags.
The color tags are automatically parsed and rendered.
Supported Features:
Style Tags:
Use predefined style tags to format text. Example:
color.Print("<suc>he</><comment>llo</>, <cyan>wel</><red>come</>")Custom Color Attributes:
Use specific color attributes for more granular control. Example:
color.Println("<fg=11aa23>he</><bg=120,35,156>llo</>, <fg=167;bg=232>wel</><fg=red>come</>")Color tag more detail in https://gookit.github.io/color/#/?id=html-like-tag-usage
Closes https://github.com/goravel/goravel/issues/?
@coderabbitai summary
✅ Checks