mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Add time interval filtering to downloader.
This commit is contained in:
parent
0e297fc616
commit
de0599ebe3
4 changed files with 36 additions and 12 deletions
|
|
@ -153,6 +153,11 @@ func (d *downloader) download(ctx context.Context, domain string) error {
|
|||
base,
|
||||
nil)
|
||||
|
||||
// Do we need time range based filtering?
|
||||
if d.cfg.Range != nil {
|
||||
afp.AgeAccept = d.cfg.Range.Contains
|
||||
}
|
||||
|
||||
return afp.Process(func(label csaf.TLPLabel, files []csaf.AdvisoryFile) error {
|
||||
return d.downloadFiles(ctx, label, files)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue