fix: error when exporting from storage to index
1 file changed, 3 insertions(+), 3 deletions(-)
changed files
M internal/storage/store.go → internal/storage/store.go
@@ -181,7 +181,7 @@ return doc, nil } -func MakeSourceExporter( +func MakeSourceExporter[T nix.Importable]( store *Store, source *config.Source, ) func(context.Context) (<-chan nix.Importable, <-chan error) {@@ -193,8 +193,8 @@ go func() { defer close(results) defer close(errs) - var obj nix.Importable - objs := make([]nix.Importable, 0, BatchSize) + var obj T + objs := make([]T, 0, BatchSize) node := store.From(source.Key) count, err := node.Count(&obj) if err != nil {