From 37deedc9b1da92571548c920721984d545269eb4 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 13 May 2024 15:07:00 +0200 Subject: refactor: move Source/Repository types to config package --- internal/importer/importer.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'internal/importer/importer.go') diff --git a/internal/importer/importer.go b/internal/importer/importer.go index 0f7978d..5f251b0 100644 --- a/internal/importer/importer.go +++ b/internal/importer/importer.go @@ -4,6 +4,7 @@ import ( "context" "log/slog" "path" + "searchix/internal/config" "searchix/internal/search" "sync" ) @@ -14,7 +15,7 @@ type Importer interface { } func NewNixpkgsChannelImporter( - source *Source, + source *config.Source, dataPath string, logger *slog.Logger, ) *NixpkgsChannelImporter { @@ -27,7 +28,11 @@ func NewNixpkgsChannelImporter( } } -func NewChannelImporter(source *Source, dataPath string, logger *slog.Logger) *ChannelImporter { +func NewChannelImporter( + source *config.Source, + dataPath string, + logger *slog.Logger, +) *ChannelImporter { fullpath := path.Join(dataPath, source.Channel) return &ChannelImporter{ @@ -39,7 +44,7 @@ func NewChannelImporter(source *Source, dataPath string, logger *slog.Logger) *C type importConfig struct { Filename string - Source *Source + Source *config.Source Logger *slog.Logger } -- cgit 1.4.1