File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ func main() {
2525
2626### Function and variable
2727
28- You can use the ` Ize(color, message) ` function in conjunction with a variable:
28+ You can use the ` Colorize(color, message) ` / ` Ize(color, message) ` function in conjunction with a variable:
2929
3030``` go
3131package main
@@ -34,16 +34,20 @@ import "github.com/TwinProduction/go-color"
3434
3535func main () {
3636 println (color.Ize (color.Red , " Something something something" ))
37+ // Or if you prefer the longer version
38+ println (color.Colorize (color.Red , " Something something something" ))
3739}
3840```
3941
4042Unlike the method above, using this function will automatically prepend ` color.Reset ` at the
4143end of your message.
4244
45+ Because I felt reading ` color.Ize() ` to be more visually pleasant than ` color.Colorize() ` , I included ` Ize() ` as an alias for ` Colorize() ` .
4346
44- ### Why is it called Ize
45-
46- Because I felt reading ` color.Ize(...) ` to be more visually pleasant than ` color.Colorize(...) `
47+ I'm not usually a big fan of having two methods doing the same thing, but since
48+ this package doesn't have much room for growth (its only purpose is to colorize
49+ terminal outputs, after all, and there isn't hundreds of ways to go about it),
50+ I believe it's acceptable to have both.
4751
4852
4953## Installation
You can’t perform that action at this time.
0 commit comments