changed store.Store to accept generic key type

This commit is contained in:
Gani Georgiev
2024-12-23 15:44:00 +02:00
parent e18116d859
commit 39df26ee21
12 changed files with 57 additions and 54 deletions

View File

@@ -11,7 +11,7 @@ import (
"github.com/spf13/cast"
)
var cachedColors = store.New[*color.Color](nil)
var cachedColors = store.New[string, *color.Color](nil)
// getColor returns [color.Color] object and cache it (if not already).
func getColor(attrs ...color.Attribute) (c *color.Color) {