changed store.Store to accept generic key type
This commit is contained in:
@@ -37,7 +37,7 @@ import (
|
||||
// Use the Registry.Load* methods to load templates into the registry.
|
||||
func NewRegistry() *Registry {
|
||||
return &Registry{
|
||||
cache: store.New[*Renderer](nil),
|
||||
cache: store.New[string, *Renderer](nil),
|
||||
funcs: template.FuncMap{
|
||||
"raw": func(str string) template.HTML {
|
||||
return template.HTML(str)
|
||||
@@ -50,7 +50,7 @@ func NewRegistry() *Registry {
|
||||
//
|
||||
// Use the Registry.Load* methods to load templates into the registry.
|
||||
type Registry struct {
|
||||
cache *store.Store[*Renderer]
|
||||
cache *store.Store[string, *Renderer]
|
||||
funcs template.FuncMap
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user