all repos — searchix @ 8ab9adf719090e213bd91b2747986ba6ef94576d

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

fix: pointer type mismatch

Alan Pearce
commit

8ab9adf719090e213bd91b2747986ba6ef94576d

parent

631c02ac689b3366987918737e2b09f52fb16dda

M internal/importer/channel.gointernal/importer/channel.go
@@ -17,7 +17,7 @@ )
type ChannelImporter struct { DataPath string - Source Source + Source *Source SourceFile string Logger *slog.Logger indexPath string
M internal/importer/importer.gointernal/importer/importer.go
@@ -28,7 +28,7 @@ Import(context.Context, *search.WriteIndex) (bool, error)
} func NewNixpkgsChannelImporter( - source Source, + source *Source, dataPath string, logger *slog.Logger, ) *NixpkgsChannelImporter {
@@ -43,7 +43,7 @@ indexPath: indexPath,
} } -func NewChannelImporter(source Source, dataPath string, logger *slog.Logger) *ChannelImporter { +func NewChannelImporter(source *Source, dataPath string, logger *slog.Logger) *ChannelImporter { indexPath := dataPath fullpath := path.Join(dataPath, source.Channel)
@@ -58,7 +58,7 @@
type importConfig struct { IndexPath string Filename string - Source Source + Source *Source Logger *slog.Logger }
M internal/importer/ingest.gointernal/importer/ingest.go
@@ -106,14 +106,14 @@ dec *jstream.Decoder
ms *mapstructure.Decoder optJSON nixOptionJSON infile *os.File - source Source + source *Source } type Ingester[T options.NixOption] interface { Process() (<-chan *T, <-chan error) } -func NewOptionProcessor(inpath string, source Source) (*OptionIngester, error) { +func NewOptionProcessor(inpath string, source *Source) (*OptionIngester, error) { infile, err := os.Open(inpath) if err != nil { return nil, errors.WithMessagef(err, "failed to open input file %s", inpath)
M internal/importer/nixpkgs-channel.gointernal/importer/nixpkgs-channel.go
@@ -15,7 +15,7 @@ )
type NixpkgsChannelImporter struct { DataPath string - Source Source + Source *Source Logger *slog.Logger indexPath string }