all repos — searchix @ 0dc3ac14c8cd367a415bc14f5e0dd682420e5480

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

refactor: deduplicate indexing code

Alan Pearce
commit

0dc3ac14c8cd367a415bc14f5e0dd682420e5480

parent

d0795bbe26047bd8c270d51dec4a66edc69c2a6a

1 file changed, 3 insertions(+), 3 deletions(-)

changed files
M internal/importer/importer.gointernal/importer/importer.go
@@ -20,7 +20,7 @@ ImportSource func(context.Context) (<-chan nix.Importable, <-chan error)
ImportDestination func(context.Context, <-chan nix.Importable) <-chan error ) -func Import( +func pipe( ctx context.Context, log *log.Logger, src ImportSource,
@@ -67,11 +67,11 @@
return hadObjectErrors, criticalError } -func (imp *Importer) IndexSource( +func (imp *Importer) indexSource( ctx context.Context, source *config.Source, ) (bool, error) { - return Import( + return pipe( ctx, imp.options.Logger, storage.MakeSourceExporter(imp.options.Storage, source),