distro: add a Name stringer

Signed-off-by: Alfredo Deza <adeza@anchore.com>
This commit is contained in:
Alfredo Deza 2020-06-11 10:02:15 -04:00
parent 64a9125895
commit f1851556a8

View File

@ -33,5 +33,10 @@ func (d Distro) FullVersion() string {
} }
func (d Distro) String() 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)
} }