refactor: reduce use of pointers in particular, Source can no longer be nil. Instantiate a Source with an Importer of All instead
1 file changed, 2 insertions(+), 2 deletions(-)
changed files
M internal/programs/programs.go → internal/programs/programs.go
@@ -17,7 +17,7 @@ "alin.ovh/searchix/internal/file" ) type DB struct { - source *config.Source + source config.Source logger *log.Logger root *file.Root db *sql.DB@@ -29,7 +29,7 @@ Logger *log.Logger Root *file.Root } -func New(source *config.Source, options *Options) (*DB, error) { +func New(source config.Source, options *Options) (*DB, error) { db, err := sql.Open("sqlite", fmt.Sprintf( "file:%s?mode=%s&_pragma=foreign_keys(1)&_pragma=mmap_size(%d)", //nolint:forbidigo // external package