New configuration system

This commit is contained in:
Deluan 2016-03-30 00:05:57 -04:00
parent 9049d97820
commit c2b1f9782b
14 changed files with 101 additions and 41 deletions

View file

@ -3,11 +3,11 @@ package utils
import (
"strings"
"github.com/astaxie/beego"
"github.com/deluan/gosonic/conf"
)
func NoArticle(name string) string {
articles := strings.Split(beego.AppConfig.String("ignoredArticles"), " ")
articles := strings.Split(conf.GoSonic.IgnoredArticles, " ")
for _, a := range articles {
n := strings.TrimPrefix(name, a+" ")
if n != name {