From f1851556a8f0a498266078c2a21df86564c3fb53 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Thu, 11 Jun 2020 10:02:15 -0400 Subject: [PATCH] distro: add a Name stringer Signed-off-by: Alfredo Deza --- imgbom/distro/distro.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/imgbom/distro/distro.go b/imgbom/distro/distro.go index cdd32fa51..c6a0e2a93 100644 --- a/imgbom/distro/distro.go +++ b/imgbom/distro/distro.go @@ -33,5 +33,10 @@ func (d Distro) FullVersion() string { } func (d Distro) String() string { - return fmt.Sprintf("%s %s", d.Type, d.Version) + return fmt.Sprintf("%s %s", d.Type, d.RawVersion) +} + +// Name provides a string repr of the distro +func (d Distro) Name() string { + return fmt.Sprintf("%s", d.Type) }