From cc84b246357b51fcc282234c1200e0cc83bd8632 Mon Sep 17 00:00:00 2001 From: Egor Aristov Date: Mon, 27 Oct 2025 17:36:44 +0300 Subject: [PATCH] small changes --- kitcom/main.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/kitcom/main.go b/kitcom/main.go index 258fa4a..04d637b 100644 --- a/kitcom/main.go +++ b/kitcom/main.go @@ -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