MCPcopy Create free account
hub / github.com/XmirrorSecurity/OpenSCA-cli / checkFileExt

Function checkFileExt

opensca/walk/magic.go:26–36  ·  view source on GitHub ↗

checkFileExt 检查文件后缀

(abspath string, exts ...string)

Source from the content-addressed store, hash-verified

24
25// checkFileExt 检查文件后缀
26func checkFileExt(abspath string, exts ...string) bool {
27 for _, ext := range exts {
28 if ext == "" {
29 continue
30 }
31 if strings.HasSuffix(abspath, ext) {
32 return true
33 }
34 }
35 return false
36}
37
38// checkFileHead 检查文件头
39func checkFileHead(abspath string, ms ...Magic) bool {

Callers 2

xtarFunction · 0.85
xjarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected