diff options
author | Alan Pearce | 2024-05-13 15:07:00 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-13 15:07:00 +0200 |
commit | 37deedc9b1da92571548c920721984d545269eb4 (patch) | |
tree | 4e5eae6e7bc95bf70d2ec954e042e4193b13137a /internal/importer/importer.go | |
parent | f700a3284ecc88bb2af1df5f0c8d242290a549cc (diff) | |
download | searchix-37deedc9b1da92571548c920721984d545269eb4.tar.lz searchix-37deedc9b1da92571548c920721984d545269eb4.tar.zst searchix-37deedc9b1da92571548c920721984d545269eb4.zip |
refactor: move Source/Repository types to config package
Diffstat (limited to 'internal/importer/importer.go')
-rw-r--r-- | internal/importer/importer.go | 11 |
1 files changed, 8 insertions, 3 deletions
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 } |