MCPcopy Create free account
hub / github.com/SignTools/SignTools / isAllowedExt

Function isAllowedExt

src/config/config.go:165–173  ·  view source on GitHub ↗
(allowedExts []string, fileName string)

Source from the content-addressed store, hash-verified

163}
164
165func isAllowedExt(allowedExts []string, fileName string) bool {
166 fileExt := filepath.Ext(fileName)
167 for _, ext := range allowedExts {
168 if fileExt == ext {
169 return true
170 }
171 }
172 return false
173}
174
175func getFile(mapDelim rune, fileName string) (*File, error) {
176 k := koanf.New(string(mapDelim))

Callers 1

LoadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected