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, 6 insertions(+), 8 deletions(-)
changed files
M internal/components/results.go → internal/components/results.go
@@ -22,14 +22,12 @@ return Span(Role("status"), g.Text("Nothing found")) } var content g.Node - if r.Source != nil { - switch r.Source.Importer { - case config.Options: - content = Options(r.Results) - case config.Packages: - content = Packages(r.Results) - } - } else { + switch r.Source.Importer { + case config.Options: + content = Options(r.Results) + case config.Packages: + content = Packages(r.Results) + case config.All: content = Combined(r.Results) }