mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-13 09:50:00 +08:00
feat: Support projectPkg template variables in config, handler, logic, main, and svc template files (#4939)
This commit is contained in:
@@ -29,7 +29,7 @@ const (
|
||||
//go:embed config.tpl
|
||||
var configTemplate string
|
||||
|
||||
func genConfig(dir string, cfg *config.Config, api *spec.ApiSpec) error {
|
||||
func genConfig(dir, projectPkg string, cfg *config.Config, api *spec.ApiSpec) error {
|
||||
filename, err := format.FileNamingFormat(cfg.NamingFormat, configFile)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -60,6 +60,7 @@ func genConfig(dir string, cfg *config.Config, api *spec.ApiSpec) error {
|
||||
"authImport": authImportStr,
|
||||
"auth": strings.Join(auths, "\n"),
|
||||
"jwtTrans": strings.Join(jwtTransList, "\n"),
|
||||
"projectPkg": projectPkg,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user