feat: split storage import and indexing
1 file changed, 12 insertions(+), 0 deletions(-)
changed files
M internal/nix/importable.go → internal/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{})