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()) p, err := apiParserByFilePath(i.Name())
if err == nil { if err == nil {
if parser != nil { if parser != nil {
if path.Ext(i.Name()) == ext { if path.Ext(i.Name()) != ext {
parser.AddFile(curPath)
return nil
}
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)
} }
} else {
parser = p
ext = path.Ext(i.Name())
}
parser.AddFile(curPath)
} }
return nil return nil