feat: Convert templ components to gomponents
1 file changed, 10 insertions(+), 0 deletions(-)
changed files
M internal/components/data.go → internal/components/data.go
@@ -4,6 +4,7 @@ import ( "go.alanpearce.eu/searchix/frontend" "go.alanpearce.eu/searchix/internal/config" search "go.alanpearce.eu/searchix/internal/index" + "go.alanpearce.eu/searchix/internal/nix" ) type TemplateData struct {@@ -24,3 +25,12 @@ Prev string Next string All string } + +func convertMatch[I nix.Importable](m nix.Importable) *I { + i, ok := m.(I) + if !ok { + return nil + } + + return &i +}