all repos — searchix @ 520dcca2755dbbab13ceebdc53d03beec8b94533

Search engine for NixOS, nix-darwin, home-manager and NUR users

feat: store data separate from search index

Alan Pearce
commit

520dcca2755dbbab13ceebdc53d03beec8b94533

parent

d25925f0d7c7e0951e739473795309514f5b558a

1 file changed, 5 insertions(+), 9 deletions(-)

changed files
M internal/components/combined.gointernal/components/combined.go
@@ -10,15 +10,11 @@ . "alin.ovh/gomponents/html"
) func CombinedData(data nix.Importable) g.Node { - switch data.(type) { - case nix.Option: - if o := convertMatch[nix.Option](data); o != nil { - return firstSentence(o.Description) - } - case nix.Package: - if p := convertMatch[nix.Package](data); p != nil { - return g.Text(firstSentence(p.Description)) - } + switch data := data.(type) { + case *nix.Option: + return firstSentence(data.Description) + case *nix.Package: + return g.Text(firstSentence(data.Description)) } return g.Text("No description Available")