From 4bd9f2f3eb8bb81cc39e18874aa9d266901f3228 Mon Sep 17 00:00:00 2001 From: Rogee Date: Mon, 22 Sep 2025 14:55:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=81=E8=AE=B8=E8=A7=A3=E6=9E=90=20?= =?UTF-8?q?services.gen.go=20=E6=96=87=E4=BB=B6=EF=BC=8C=E5=A2=9E=E5=BC=BA?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=96=87=E4=BB=B6=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/ast/provider/config.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/ast/provider/config.go b/pkg/ast/provider/config.go index d7b222b..f5a8c5f 100644 --- a/pkg/ast/provider/config.go +++ b/pkg/ast/provider/config.go @@ -114,10 +114,13 @@ func (c *ParserContext) ShouldIncludeFile(filePath string) bool { return false } - // Skip generated files if not allowed, but allow routes.gen.go since it may contain providers - if !c.Config.AllowGenFiles && strings.HasSuffix(filePath, ".gen.go") && !strings.HasSuffix(filePath, "routes.gen.go") { + // Skip generated files if not allowed, but allow routes.gen.go and services.gen.go since they may contain providers + if !c.Config.AllowGenFiles { return false } + // if !c.Config.AllowGenFiles && strings.HasSuffix(filePath, ".gen.go") && !strings.HasSuffix(filePath, "routes.gen.go") && !strings.HasSuffix(filePath, "services.gen.go") { + // return false + // } // Check file size if info, err := os.Stat(filePath); err == nil {