From f51cae2043c92d3def45587b1fb874f5bac8e834 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Fri, 17 Jul 2020 13:06:25 -0400 Subject: [PATCH] distro: add new constructor for getting UnkownDistros Signed-off-by: Alfredo Deza --- imgbom/distro/distro.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/imgbom/distro/distro.go b/imgbom/distro/distro.go index 6ad0b2cae..ac7b518a1 100644 --- a/imgbom/distro/distro.go +++ b/imgbom/distro/distro.go @@ -12,6 +12,13 @@ type Distro struct { 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) { verObj, err := hashiVer.NewVersion(ver) if err != nil {