diff options
author | Alan Pearce | 2024-05-09 20:10:23 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-09 20:10:23 +0200 |
commit | 8ab9adf719090e213bd91b2747986ba6ef94576d (patch) | |
tree | 66f2812851f8ac1ff98af39e6863d0907e090c67 | |
parent | 631c02ac689b3366987918737e2b09f52fb16dda (diff) | |
download | searchix-8ab9adf719090e213bd91b2747986ba6ef94576d.tar.lz searchix-8ab9adf719090e213bd91b2747986ba6ef94576d.tar.zst searchix-8ab9adf719090e213bd91b2747986ba6ef94576d.zip |
fix: pointer type mismatch
-rw-r--r-- | internal/importer/channel.go | 2 | ||||
-rw-r--r-- | internal/importer/importer.go | 6 | ||||
-rw-r--r-- | internal/importer/ingest.go | 4 | ||||
-rw-r--r-- | internal/importer/nixpkgs-channel.go | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/internal/importer/channel.go b/internal/importer/channel.go index b75839b..3c199cc 100644 --- a/internal/importer/channel.go +++ b/internal/importer/channel.go @@ -17,7 +17,7 @@ import ( type ChannelImporter struct { DataPath string - Source Source + Source *Source SourceFile string Logger *slog.Logger indexPath string diff --git a/internal/importer/importer.go b/internal/importer/importer.go index 4d563fd..1338615 100644 --- a/internal/importer/importer.go +++ b/internal/importer/importer.go @@ -28,7 +28,7 @@ type Importer interface { } func NewNixpkgsChannelImporter( - source Source, + source *Source, dataPath string, logger *slog.Logger, ) *NixpkgsChannelImporter { @@ -43,7 +43,7 @@ func NewNixpkgsChannelImporter( } } -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 @@ func NewChannelImporter(source Source, dataPath string, logger *slog.Logger) *Ch type importConfig struct { IndexPath string Filename string - Source Source + Source *Source Logger *slog.Logger } diff --git a/internal/importer/ingest.go b/internal/importer/ingest.go index 3d6854d..0044d67 100644 --- a/internal/importer/ingest.go +++ b/internal/importer/ingest.go @@ -106,14 +106,14 @@ type OptionIngester struct { 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) diff --git a/internal/importer/nixpkgs-channel.go b/internal/importer/nixpkgs-channel.go index e237246..b78844b 100644 --- a/internal/importer/nixpkgs-channel.go +++ b/internal/importer/nixpkgs-channel.go @@ -15,7 +15,7 @@ import ( type NixpkgsChannelImporter struct { DataPath string - Source Source + Source *Source Logger *slog.Logger indexPath string } |