1
0

Allow to enumerate distro types

This commit is contained in:
dump_stack() 2018-10-27 15:24:13 +00:00
parent 7040fb7a0b
commit e91af205f4

View File

@ -93,8 +93,10 @@ const (
Debian Debian
) )
var distroTypeStrings = [...]string{"Ubuntu", "CentOS", "Debian"}
func (dt distroType) String() string { func (dt distroType) String() string {
return [...]string{"Ubuntu", "CentOS", "Debian"}[dt] return distroTypeStrings[dt]
} }
func (dt *distroType) UnmarshalTOML(data []byte) (err error) { func (dt *distroType) UnmarshalTOML(data []byte) (err error) {