refactor: deduplicate indexing code
1 file changed, 3 insertions(+), 3 deletions(-)
changed files
M internal/importer/importer.go → internal/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),