small changes
This commit is contained in:
parent
7583530c6c
commit
cc84b24635
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user