Some refactoring

This commit is contained in:
Deluan
2016-02-29 13:56:09 -05:00
parent 1c47b7b8ef
commit 1a4f783669
4 changed files with 19 additions and 24 deletions
-16
View File
@@ -1,23 +1,7 @@
package models
import (
"strings"
"github.com/astaxie/beego"
)
type Artist struct {
Id string
Name string
Albums map[string]bool
}
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
}