Generating the Artist Tree CONTENT
This will be helpful to generate the slice only once.
This commit is contained in:
parent
2a2e6336e4
commit
0c98bef74a
14
utils.go
14
utils.go
@ -67,6 +67,20 @@ func getText(width, percentage float64, eta string) string {
|
||||
return q
|
||||
}
|
||||
|
||||
func ConvertToArray() []string {
|
||||
var p []string
|
||||
for k2, v := range ARTIST_TREE {
|
||||
p = append(p, k2)
|
||||
for k1, v1 := range v {
|
||||
p = append(p, k1)
|
||||
for k := range v1 {
|
||||
p = append(p, k)
|
||||
}
|
||||
}
|
||||
}
|
||||
return p
|
||||
}
|
||||
|
||||
func formatString(a interface{}) string {
|
||||
if a == "play" {
|
||||
return "Playing"
|
||||
|
Loading…
Reference in New Issue
Block a user