code
This commit is contained in:
18
utils.go
Normal file
18
utils.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
import "github.com/fatih/color"
|
||||
|
||||
func getColor(status string) *color.Color {
|
||||
switch status {
|
||||
case "Running":
|
||||
return color.New(color.FgGreen)
|
||||
case "Pending":
|
||||
return color.New(color.FgYellow)
|
||||
case "Failed":
|
||||
return color.New(color.FgRed)
|
||||
case "Succeeded":
|
||||
return color.New(color.FgBlue)
|
||||
default:
|
||||
return color.New(color.FgWhite)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user