Big LedisDB refactoring
This commit is contained in:
@@ -20,20 +20,4 @@ func NoArticle(name string) string {
|
||||
}
|
||||
}
|
||||
return name
|
||||
}
|
||||
|
||||
func (a *Artist) AddAlbums(albums ...interface{}) {
|
||||
if a.Albums == nil {
|
||||
a.Albums = make(map[string]bool)
|
||||
}
|
||||
for _, v := range albums {
|
||||
switch v := v.(type) {
|
||||
case *Album:
|
||||
a.Albums[v.Id] = true
|
||||
case map[string]bool:
|
||||
for k, _ := range v {
|
||||
a.Albums[k] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user