mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
35 lines
361 B
Go
35 lines
361 B
Go
package pkg
|
|
|
|
const (
|
|
UnknownPkg Type = iota
|
|
ApkPkg
|
|
DebPkg
|
|
JavaPkg
|
|
NodePkg
|
|
PacmanPkg
|
|
PythonPkg
|
|
RpmPkg
|
|
RubyPkg
|
|
)
|
|
|
|
type Type uint
|
|
|
|
var typeStr = []string{
|
|
"UnknownPackage",
|
|
"apk",
|
|
"deb",
|
|
"java",
|
|
"node",
|
|
"pacman",
|
|
"python",
|
|
"rpm",
|
|
"ruby",
|
|
}
|
|
|
|
func (t Type) String() string {
|
|
if int(t) >= len(typeStr) {
|
|
return typeStr[0]
|
|
}
|
|
return typeStr[t]
|
|
}
|