mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
53 lines
661 B
Go
53 lines
661 B
Go
package distro
|
|
|
|
const (
|
|
UnknownDistro Type = iota
|
|
Debian
|
|
// Ubuntu
|
|
// RedHat
|
|
// CentOS
|
|
// Fedora
|
|
// Alpine
|
|
// Busybox
|
|
// AmazonLinux
|
|
// OracleLinux
|
|
// ArchLinux
|
|
)
|
|
|
|
type Type int
|
|
|
|
var distroStr = []string{
|
|
"UnknownDistro",
|
|
"Debian",
|
|
// "Ubuntu",
|
|
// "RedHat",
|
|
// "CentOS",
|
|
// "Fedora",
|
|
// "Alpine",
|
|
// "Busybox",
|
|
// "AmazonLinux",
|
|
// "OracleLinux",
|
|
// "ArchLinux",
|
|
}
|
|
|
|
var All = []Type{
|
|
Debian,
|
|
// Ubuntu,
|
|
// RedHat,
|
|
// CentOS,
|
|
// Fedora,
|
|
// Alpine,
|
|
// Busybox,
|
|
// AmazonLinux,
|
|
// OracleLinux,
|
|
// ArchLinux,
|
|
}
|
|
|
|
func (t Type) String() string {
|
|
if int(t) >= len(distroStr) || t < 0 {
|
|
return distroStr[0]
|
|
}
|
|
|
|
return distroStr[t]
|
|
}
|