mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Clean up some colourizing switch statements
This commit is contained in:
@@ -67,16 +67,12 @@ func (widget *Widget) contentFrom(view *View) string {
|
||||
}
|
||||
|
||||
func (widget *Widget) jobColor(job *Job) string {
|
||||
var color string
|
||||
|
||||
switch job.Color {
|
||||
case "blue":
|
||||
color = "green"
|
||||
return "blue"
|
||||
case "red":
|
||||
color = "red"
|
||||
return "red"
|
||||
default:
|
||||
color = "white"
|
||||
return "white"
|
||||
}
|
||||
|
||||
return color
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user