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/ingest.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/ingest.go')
-rw-r--r-- | internal/importer/ingest.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/importer/ingest.go b/internal/importer/ingest.go index 7706807..f78722a 100644 --- a/internal/importer/ingest.go +++ b/internal/importer/ingest.go @@ -7,6 +7,7 @@ import ( "net/url" "os" "reflect" + "searchix/internal/config" "searchix/internal/options" "github.com/bcicen/jstream" @@ -108,14 +109,14 @@ type OptionIngester struct { ms *mapstructure.Decoder optJSON nixOptionJSON infile *os.File - source *Source + source *config.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 *config.Source) (*OptionIngester, error) { infile, err := os.Open(inpath) if err != nil { return nil, errors.WithMessagef(err, "failed to open input file %s", inpath) |