small changes

This commit is contained in:
Egor Aristov 2025-10-27 17:36:44 +03:00
parent 7583530c6c
commit cc84b24635
Signed by: egor3f
GPG Key ID: 40482A264AAEC85F

View File

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