Generating the Artist Tree CONTENT

This will be helpful to generate the slice only once.
This commit is contained in:
aditya-K2 2021-11-28 23:32:32 +05:30
parent 2a2e6336e4
commit 0c98bef74a

View File

@ -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"