v/GTT
1
0
mirror of https://github.com/eeeXun/GTT.git synced 2025-05-18 16:50:14 -07:00

refactor: use make to create map

This commit is contained in:
eeeXun 2023-04-23 01:09:27 +08:00
parent 035a92130a
commit aa7935969e

View File

@ -37,7 +37,7 @@ var (
func NewTheme(name string, palette map[string]int32) { func NewTheme(name string, palette map[string]int32) {
AllTheme = append(AllTheme, name) AllTheme = append(AllTheme, name)
themes[name] = map[string]tcell.Color{} themes[name] = make(map[string]tcell.Color)
for color, rgb := range palette { for color, rgb := range palette {
themes[name][color] = tcell.NewHexColor(rgb) themes[name][color] = tcell.NewHexColor(rgb)
} }