all repos — searchix @ 0e24d9cde2f9a9e94315fa463d6503ddd64255c2

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

refactor: reduce use of pointers in particular, Source can no longer be nil. Instantiate a Source with an Importer of All instead

Alan Pearce
commit

0e24d9cde2f9a9e94315fa463d6503ddd64255c2

parent

05838942b9468dd1efb6d295a206730fa82264c0

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

changed files
M internal/importer/main.gointernal/importer/main.go
@@ -181,7 +181,7 @@ }
func (imp *Importer) PruneSource( _ context.Context, - source *config.Source, + source config.Source, ) error { read := imp.options.ReadIndex write := imp.options.WriteIndex
@@ -240,8 +240,8 @@ func (imp *Importer) createSourceFetcher(
parent context.Context, meta *index.Meta, forceUpdate bool, -) func(*config.Source) error { - return func(source *config.Source) error { +) func(config.Source) error { + return func(source config.Source) error { logger := imp.options.Logger.With("name", source.Key) pdb, err := programs.New(source, &programs.Options{ Logger: logger,
@@ -322,8 +322,8 @@
func (imp *Importer) createSourceImporter( parent context.Context, meta *index.Meta, -) func(*config.Source) error { - return func(source *config.Source) error { +) func(config.Source) error { + return func(source config.Source) error { logger := imp.options.Logger.With("name", source.Key) pdb, err := programs.New(source, &programs.Options{ Logger: logger,