mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 18:15:42 +01:00
Move code from checker to library
This commit is contained in:
parent
c8b53a8143
commit
dad549c392
2 changed files with 12 additions and 6 deletions
|
|
@ -464,12 +464,7 @@ func (p *processor) processROLIEFeed(feed string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extract the CSAF files from feed.
|
// Extract the CSAF files from feed.
|
||||||
var files []string
|
files := rfeed.Files()
|
||||||
for _, f := range rfeed.Feed.Entry {
|
|
||||||
for i := range f.Link {
|
|
||||||
files = append(files, f.Link[i].HRef)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := p.integrity(files, base, rolieMask, p.badProviderMetadata.add); err != nil &&
|
if err := p.integrity(files, base, rolieMask, p.badProviderMetadata.add); err != nil &&
|
||||||
err != errContinue {
|
err != errContinue {
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,17 @@ func (rf *ROLIEFeed) EntryByID(id string) *Entry {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Files extracts the files from the feed.
|
||||||
|
func (rf *ROLIEFeed) Files() []string {
|
||||||
|
var files []string
|
||||||
|
for _, f := range rf.Feed.Entry {
|
||||||
|
for i := range f.Link {
|
||||||
|
files = append(files, f.Link[i].HRef)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return files
|
||||||
|
}
|
||||||
|
|
||||||
// SortEntriesByUpdated sorts all the entries in the feed
|
// SortEntriesByUpdated sorts all the entries in the feed
|
||||||
// by their update times.
|
// by their update times.
|
||||||
func (rf *ROLIEFeed) SortEntriesByUpdated() {
|
func (rf *ROLIEFeed) SortEntriesByUpdated() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue