Adding variant override

This commit is contained in:
Alex Yatskov 2015-09-04 13:40:46 +09:00
parent 241cd0c5ea
commit 24b53dc9dd

View File

@ -48,8 +48,12 @@ func makeAbsPath(path string) string {
} }
func makeVariantNames(name, variant string) []string { func makeVariantNames(name, variant string) []string {
names := []string{name} if strings.HasSuffix(name, "%") {
name = strings.TrimSuffix(name, "%")
variant = ""
}
names := []string{name}
if len(variant) > 0 { if len(variant) > 0 {
names = append(names, fmt.Sprint(name, "%", variant)) names = append(names, fmt.Sprint(name, "%", variant))
} }