github.com/quay/claircore@v1.5.28/java/jar/ext.go (about) 1 package jar 2 3 import "path" 4 5 // ValidExt determines if the file name extension 6 // is a valid JAR file extension. 7 func ValidExt(name string) bool { 8 ext := path.Ext(name) 9 switch ext { 10 case ".jar", ".war", ".ear": // OK 11 case ".jpi", ".hpi": // Jenkins plugins 12 default: 13 return false 14 } 15 16 return true 17 }