feat: support goctl --module to set go module (#5135)

This commit is contained in:
Kevin Wan
2025-08-31 16:40:49 +08:00
committed by GitHub
parent d728a3b2d9
commit 955b8016aa
14 changed files with 944 additions and 6 deletions

View File

@@ -27,6 +27,8 @@ var (
VarStringBranch string
// VarStringStyle describes the style of output files.
VarStringStyle string
// VarStringModule describes the module name for go.mod.
VarStringModule string
)
// CreateServiceCommand fast create service
@@ -83,6 +85,6 @@ func CreateServiceCommand(_ *cobra.Command, args []string) error {
return err
}
err = gogen.DoGenProject(apiFilePath, abs, VarStringStyle, false)
err = gogen.DoGenProjectWithModule(apiFilePath, abs, VarStringModule, VarStringStyle, false)
return err
}