mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
distro: add new constructor for getting UnkownDistros
Signed-off-by: Alfredo Deza <adeza@anchore.com>
This commit is contained in:
parent
f03f7b32e9
commit
f51cae2043
@ -12,6 +12,13 @@ type Distro struct {
|
|||||||
RawVersion string
|
RawVersion string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewUnknownDistro creates a standardized UnkownDistro with a "0.0.0" version
|
||||||
|
func NewUnknownDistro() Distro {
|
||||||
|
return Distro{
|
||||||
|
Type: UnknownDistro,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func NewDistro(t Type, ver string) (Distro, error) {
|
func NewDistro(t Type, ver string) (Distro, error) {
|
||||||
verObj, err := hashiVer.NewVersion(ver)
|
verObj, err := hashiVer.NewVersion(ver)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user