mirror of
https://github.com/KevinMidboe/motdGOi.git
synced 2025-10-29 17:50:24 +00:00
new todo, if to switch
This commit is contained in:
@@ -102,3 +102,4 @@ Other fonts can mainly be found on [figlet](http://www.figlet.org). You have to
|
|||||||
- [ ] automatic the perfect char margin
|
- [ ] automatic the perfect char margin
|
||||||
- [ ] Linebreak possible?
|
- [ ] Linebreak possible?
|
||||||
- [x] Colors in the cli client
|
- [x] Colors in the cli client
|
||||||
|
- [ ] No dependencies (fatih/color)
|
||||||
@@ -62,37 +62,23 @@ func getColorSlice(colorStr string) []color.Attribute {
|
|||||||
colors := make([]color.Attribute, len(givenColors))
|
colors := make([]color.Attribute, len(givenColors))
|
||||||
|
|
||||||
for i, c := range givenColors {
|
for i, c := range givenColors {
|
||||||
if c == "black" {
|
switch c {
|
||||||
|
case "black":
|
||||||
colors[i] = color.FgBlack
|
colors[i] = color.FgBlack
|
||||||
continue
|
case "red":
|
||||||
}
|
|
||||||
if c == "red" {
|
|
||||||
colors[i] = color.FgRed
|
colors[i] = color.FgRed
|
||||||
continue
|
case "green":
|
||||||
}
|
|
||||||
if c == "green" {
|
|
||||||
colors[i] = color.FgGreen
|
colors[i] = color.FgGreen
|
||||||
continue
|
case "yellow":
|
||||||
}
|
|
||||||
if c == "yellow" {
|
|
||||||
colors[i] = color.FgYellow
|
colors[i] = color.FgYellow
|
||||||
continue
|
case "blue":
|
||||||
}
|
|
||||||
if c == "blue" {
|
|
||||||
colors[i] = color.FgBlue
|
colors[i] = color.FgBlue
|
||||||
continue
|
case "magenta":
|
||||||
}
|
|
||||||
if c == "magenta" {
|
|
||||||
colors[i] = color.FgMagenta
|
colors[i] = color.FgMagenta
|
||||||
continue
|
case "cyan":
|
||||||
}
|
|
||||||
if c == "cyan" {
|
|
||||||
colors[i] = color.FgCyan
|
colors[i] = color.FgCyan
|
||||||
continue
|
case "white":
|
||||||
}
|
|
||||||
if c == "white" {
|
|
||||||
colors[i] = color.FgWhite
|
colors[i] = color.FgWhite
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user