1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00
This commit is contained in:
Ferdinand Mütsch
2020-03-31 11:24:44 +02:00
parent 0664861f74
commit 0e61870568
9 changed files with 1544 additions and 7 deletions

16
utils/color.go Normal file
View File

@ -0,0 +1,16 @@
package utils
import (
"github.com/n1try/wakapi/models"
"strings"
)
func FilterLanguageColors(all map[string]string, summary *models.Summary) map[string]string {
subset := make(map[string]string)
for _, item := range summary.Languages {
if c, ok := all[strings.ToLower(item.Key)]; ok {
subset[strings.ToLower(item.Key)] = c
}
}
return subset
}