More experimenting with tiedot

This commit is contained in:
Deluan
2016-02-27 03:35:01 -05:00
parent 4f9054b738
commit ecc0df9e7c
14 changed files with 175 additions and 35 deletions
+16
View File
@@ -1,6 +1,22 @@
package models
import (
"strings"
"github.com/astaxie/beego"
)
type Artist struct {
Id string
Name string
}
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
}