small changes
This commit is contained in:
parent
cc84b24635
commit
589e857cc2
@ -85,13 +85,11 @@ func apiParserByPath(src string) (ApiParser, error) {
|
||||
|
||||
p, err := apiParserByFilePath(i.Name())
|
||||
if err == nil {
|
||||
if parser != nil {
|
||||
if path.Ext(i.Name()) != ext {
|
||||
return fmt.Errorf("path contain multiple supported filetypes")
|
||||
}
|
||||
} else {
|
||||
if parser == nil {
|
||||
parser = p
|
||||
ext = path.Ext(i.Name())
|
||||
} else if path.Ext(i.Name()) != ext {
|
||||
return fmt.Errorf("path contain multiple supported filetypes")
|
||||
}
|
||||
parser.AddFile(curPath)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user