quintodrome/models/artist.go

23 lines
380 B
Go
Raw Normal View History

package models
2016-02-26 23:35:01 -09:00
import (
"strings"
"github.com/astaxie/beego"
)
type Artist struct {
2016-02-28 09:50:05 -09:00
Id string
Name string
Albums map[string]bool
2016-02-26 23:35:01 -09:00
}
func NoArticle(name string) string {
articles := strings.Split(beego.AppConfig.String("ignoredArticles"), " ")
for _, a := range articles {
n := strings.TrimPrefix(name, a + " ")
if (n != name) {
return n
}
}
return name
}