-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ondrej.benkovsky
committed
Nov 26, 2024
1 parent
727f54c
commit 9ffd83f
Showing
9 changed files
with
161 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
package printutils | ||
|
||
import "github.com/fatih/color" | ||
import ( | ||
"github.com/fatih/color" | ||
) | ||
|
||
var ( | ||
// ErrPrint is a wrapper for printing colored errors. | ||
ErrPrint = color.New(color.FgRed).FprintfFunc() | ||
// SuccessPrint is a wrapper for printing colored successes. | ||
SuccessPrint = color.New(color.FgGreen).FprintfFunc() | ||
// HighlightStr is a wrapper for highlighting strings with color. | ||
HighlightStr = color.New(color.FgYellow).SprintFunc() | ||
// ErrFprintf is a wrapper for printing colored errors. | ||
ErrFprintf = color.New(color.FgRed).FprintfFunc() | ||
// SuccessFprintf is a wrapper for printing colored successes. | ||
SuccessFprintf = color.New(color.FgGreen).FprintfFunc() | ||
// NeutralFprintf is a wrapper for printing neutral information. | ||
NeutralFprintf = color.New().FprintfFunc() | ||
|
||
highlightColor = color.New(color.FgYellow) | ||
// HighlightSprintf is a wrapper for highlighting formatted strings with color. | ||
HighlightSprintf = highlightColor.SprintfFunc() | ||
// HighlightSprint is a wrapper for highlighting strings with color. | ||
HighlightSprint = highlightColor.SprintFunc() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.