From 415b2359f6da849ce8ca951d919231e543f03086 Mon Sep 17 00:00:00 2001 From: jaronnie Date: Mon, 13 May 2024 15:52:51 +0800 Subject: [PATCH] feat(jzero): release v0.15.4 --- cmd/gen/gen.go | 2 +- main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/gen/gen.go b/cmd/gen/gen.go index 0c4af955..52c5da7e 100644 --- a/cmd/gen/gen.go +++ b/cmd/gen/gen.go @@ -259,8 +259,8 @@ func generateApiCode(wd string, apiDirName string) error { isMainApiFile = true } else if _, ok := v.(*ast.ImportLiteralStmt); ok { isMainApiFile = true - } else { } + if isMainApiFile && !isUsed { fmt.Printf("%s api file %s\n", color.WithColor("Using", color.FgGreen), filepath.Join(apiDirName, file.Name())) command := fmt.Sprintf("goctl api go --api %s --dir ./app --home %s", filepath.Join(apiDirName, file.Name()), filepath.Join(embeded.Home, "go-zero")) diff --git a/main.go b/main.go index 9af8c9d0..23ec5ffb 100644 --- a/main.go +++ b/main.go @@ -24,7 +24,7 @@ var ( // ldflags var ( - version = "0.15.3" + version = "0.15.4" commit string date string )