all repos — searchix @ 40d106a50be7fa87739e82c87c161db8e6a69b12

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

feat: split storage import and indexing

Alan Pearce
commit

40d106a50be7fa87739e82c87c161db8e6a69b12

parent

517f219f3b249a26890f881569f9eac34ba7363d

1 file changed, 12 insertions(+), 0 deletions(-)

changed files
M internal/nix/importable.gointernal/nix/importable.go
@@ -20,6 +20,18 @@ func MakeKey(source *config.Source, id string) string {
return source.Importer.Singular() + "/" + source.Key + "/" + id } +func ToGenericChannel[I Importable](in <-chan I) <-chan Importable { + out := make(chan Importable) + go func() { + for i := range in { + out <- i + } + close(out) + }() + + return out +} + func init() { gob.Register(Option{}) gob.Register(Package{})