small changes

This commit is contained in:
Egor Aristov 2025-10-27 17:38:34 +03:00
parent cc84b24635
commit 589e857cc2
Signed by: egor3f
GPG Key ID: 40482A264AAEC85F

View File

@ -85,13 +85,11 @@ func apiParserByPath(src string) (ApiParser, error) {
p, err := apiParserByFilePath(i.Name()) p, err := apiParserByFilePath(i.Name())
if err == nil { if err == nil {
if parser != nil { if parser == nil {
if path.Ext(i.Name()) != ext {
return fmt.Errorf("path contain multiple supported filetypes")
}
} else {
parser = p parser = p
ext = path.Ext(i.Name()) ext = path.Ext(i.Name())
} else if path.Ext(i.Name()) != ext {
return fmt.Errorf("path contain multiple supported filetypes")
} }
parser.AddFile(curPath) parser.AddFile(curPath)
} }