1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00
wakapi/utils/color.go
Ferdinand Mütsch 7d36c4e111 Rename project.
Add build script.
2020-03-31 12:22:17 +02:00

17 lines
359 B
Go

package utils
import (
"github.com/muety/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
}