Skip to content

Commit 100455e

Browse files
committed
Merge remote-tracking branch 'sverdlov93/npm-login' into npm-login
2 parents 075a965 + cb91ec9 commit 100455e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

utils/coreutils/cmdutils.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ func extractBoolOptionFromArgs(args []string, optionName string) (cleanArgs []st
230230

231231
// Add green color style to the string if possible.
232232
func PrintTitle(str string) string {
233-
return colorStr(str, color.Green)
233+
return PrintGreen(str)
234234
}
235235

236236
// Add cyan color style to the string if possible.
@@ -253,11 +253,21 @@ func PrintComment(str string) string {
253253
return colorStr(str, color.Gray)
254254
}
255255

256+
// Add red color style to the string if possible.
257+
func PrintRed(str string) string {
258+
return colorStr(str, color.Red)
259+
}
260+
256261
// Add yellow color style to the string if possible.
257262
func PrintYellow(str string) string {
258263
return colorStr(str, color.Yellow)
259264
}
260265

266+
// Add green color style to the string if possible.
267+
func PrintGreen(str string) string {
268+
return colorStr(str, color.Green)
269+
}
270+
261271
// Add the requested style to the string if possible.
262272
func colorStr(str string, c color.Color) string {
263273
// Add styles only on supported terminals

0 commit comments

Comments
 (0)