mirror of
https://github.com/anchore/grype
synced 2024-11-10 06:34:13 +00:00
result: add a Count() helper method
Signed-off-by: Alfredo Deza <adeza@anchore.com>
This commit is contained in:
parent
4476fc9888
commit
44767fc2fb
1 changed files with 5 additions and 0 deletions
|
@ -53,3 +53,8 @@ func (r *Result) Enumerate() <-chan match.Match {
|
||||||
}()
|
}()
|
||||||
return channel
|
return channel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Count returns the total number of matches in a result
|
||||||
|
func (r *Result) Count() int {
|
||||||
|
return len(r.byPackage)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue