refactor: reduce use of pointers in particular, Source can no longer be nil. Instantiate a Source with an Importer of All instead
1 file changed, 2 insertions(+), 2 deletions(-)
changed files
M internal/index/search_test.go → internal/index/search_test.go
@@ -47,8 +47,8 @@ ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) defer cancel() - source := cfg.Importer.Sources["nixpkgs"] - if source == nil || !source.Enable { + source, exists := cfg.Importer.Sources["nixpkgs"] + if !exists || !source.Enable { t.Fatal("expected source to exist and be enabled") }