From aa7935969ea3100b64cf95e0e7bd05d1eca2dffd Mon Sep 17 00:00:00 2001 From: eeeXun Date: Sun, 23 Apr 2023 01:09:27 +0800 Subject: [PATCH] refactor: use make to create map --- internal/style/color.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/style/color.go b/internal/style/color.go index b87c942..5e136f3 100644 --- a/internal/style/color.go +++ b/internal/style/color.go @@ -37,7 +37,7 @@ var ( func NewTheme(name string, palette map[string]int32) { AllTheme = append(AllTheme, name) - themes[name] = map[string]tcell.Color{} + themes[name] = make(map[string]tcell.Color) for color, rgb := range palette { themes[name][color] = tcell.NewHexColor(rgb) }