diff options
author | Alan Pearce | 2024-05-09 18:58:14 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-09 19:28:15 +0200 |
commit | 3b379a13710cae2adc56131af1069e6fb92976b8 (patch) | |
tree | d7801226ac84e201c6eea11a04941b1137adc78f /internal/importer/importer.go | |
parent | 0986e8699e87addccbef43c0ce30a466988fed15 (diff) | |
download | searchix-3b379a13710cae2adc56131af1069e6fb92976b8.tar.lz searchix-3b379a13710cae2adc56131af1069e6fb92976b8.tar.zst searchix-3b379a13710cae2adc56131af1069e6fb92976b8.zip |
style: reformat with golines and enforce on commit
Diffstat (limited to 'internal/importer/importer.go')
-rw-r--r-- | internal/importer/importer.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/internal/importer/importer.go b/internal/importer/importer.go index 2318fe4..4d563fd 100644 --- a/internal/importer/importer.go +++ b/internal/importer/importer.go @@ -27,7 +27,11 @@ type Importer interface { Import(context.Context, *search.WriteIndex) (bool, error) } -func NewNixpkgsChannelImporter(source Source, dataPath string, logger *slog.Logger) *NixpkgsChannelImporter { +func NewNixpkgsChannelImporter( + source Source, + dataPath string, + logger *slog.Logger, +) *NixpkgsChannelImporter { indexPath := dataPath fullpath := path.Join(dataPath, source.Channel) @@ -58,7 +62,11 @@ type importConfig struct { Logger *slog.Logger } -func processOptions(parent context.Context, indexer *search.WriteIndex, conf *importConfig) (bool, error) { +func processOptions( + parent context.Context, + indexer *search.WriteIndex, + conf *importConfig, +) (bool, error) { ctx, cancel := context.WithTimeout(parent, conf.Source.ImportTimeout) defer cancel() |