Use long and short gh param value for color scheme and pattern

This commit is contained in:
2023-02-05 17:51:21 +01:00
parent 18a1c2276b
commit 6f3912a543
2 changed files with 16 additions and 2 deletions

View File

@ -47,12 +47,12 @@ func requestHandler(w http.ResponseWriter, r *http.Request) {
cFunc := icons.ColorV2
if colorScheme == "v1" {
cFunc = icons.ColorV1
} else if colorScheme == "gh" {
} else if colorScheme == "gh" || colorScheme == "github" {
cFunc = icons.ColorGh
}
var iconGenerator icons.IconGenerator
if pattern == "github" {
if pattern == "github" || pattern == "gh" {
iconGenerator = icons.NewGhIconGenerator().WithColorGenerator(cFunc)
} else {
iconGenerator = icons.NewIdIconGenerator().WithColorGenerator(cFunc)