From 589e857cc2e585baec80d2e5b440e6d3855a805c Mon Sep 17 00:00:00 2001 From: Egor Aristov Date: Mon, 27 Oct 2025 17:38:34 +0300 Subject: [PATCH] small changes --- kitcom/main.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/kitcom/main.go b/kitcom/main.go index 04d637b..b45a15a 100644 --- a/kitcom/main.go +++ b/kitcom/main.go @@ -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) }