Skip to content

Commit

Permalink
fix: delete hz client's layout.yaml (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoranz758 authored Oct 10, 2023
1 parent 1feb5d6 commit 56981a4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion cmd/static/client_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func clientFlags() []cli.Flag {
&cli.StringFlag{Name: consts.Module, Aliases: []string{"mod"}, Usage: "Specify the Go module name to generate go.mod.", Destination: &globalArgs.ClientArgument.GoMod},
&cli.StringFlag{Name: consts.IDLPath, Usage: "Specify the IDL file path. (.thrift or .proto)", Destination: &globalArgs.ClientArgument.IdlPath},
&cli.StringFlag{Name: consts.OutDir, Aliases: []string{"o"}, Usage: "Specify the output path.", Destination: &globalArgs.ClientArgument.OutDir},
&cli.StringFlag{Name: consts.Template, Usage: "Specify the output path. Currently cwgo supports git templates, such as `--template https://github.com/***/cwgo_template.git`", Destination: &globalArgs.ClientArgument.Template},
&cli.StringFlag{Name: consts.Template, Usage: "Specify the template path. Currently cwgo supports git templates, such as `--template https://github.com/***/cwgo_template.git`", Destination: &globalArgs.ClientArgument.Template},
&cli.StringFlag{Name: consts.Registry, Usage: "Specify the registry, default is None"},
&cli.StringSliceFlag{Name: consts.ProtoSearchPath, Aliases: []string{"I"}, Usage: "Add an IDL search path for includes. (Valid only if idl is protobuf)"},
&cli.StringSliceFlag{Name: consts.Pass, Usage: "pass param to hz or kitex"},
Expand Down
2 changes: 1 addition & 1 deletion cmd/static/server_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func serverFlags() []cli.Flag {
&cli.StringFlag{Name: consts.Module, Aliases: []string{"mod"}, Usage: "Specify the Go module name to generate go.mod.", Destination: &globalArgs.ServerArgument.GoMod},
&cli.StringFlag{Name: consts.IDLPath, Usage: "Specify the IDL file path. (.thrift or .proto)", Destination: &globalArgs.ServerArgument.IdlPath},
&cli.StringFlag{Name: consts.OutDir, Value: ".", Aliases: []string{"o"}, Usage: "Specify the output path. Currently cwgo supports git templates, such as `--template https://github.com/***/cwgo_template.git`.", Destination: &globalArgs.ServerArgument.OutDir},
&cli.StringFlag{Name: consts.Template, Usage: "Specify the layout template.", Destination: &globalArgs.ServerArgument.Template},
&cli.StringFlag{Name: consts.Template, Usage: "Specify the template path. Currently cwgo supports git templates, such as `--template https://github.com/***/cwgo_template.git`", Destination: &globalArgs.ServerArgument.Template},
&cli.StringFlag{Name: consts.Registry, Usage: "Specify the registry, default is None."},
&cli.StringSliceFlag{Name: consts.ProtoSearchPath, Aliases: []string{"I"}, Usage: "Add an IDL search path for includes."},
&cli.StringSliceFlag{Name: consts.Pass, Usage: "Pass param to hz or Kitex."},
Expand Down
3 changes: 0 additions & 3 deletions pkg/client/hz.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,11 @@ func convertHzArgument(ca *config.ClientArgument, hzArgument *hzConfig.Argument)
return err
}
gitPath = path.Join(tpl.HertzDir, consts.Client, gitPath)
hzArgument.CustomizeLayout = path.Join(gitPath, consts.LayoutFile)
hzArgument.CustomizePackage = path.Join(gitPath, consts.PackageLayoutFile)
} else {
if len(ca.Template) != 0 {
hzArgument.CustomizeLayout = path.Join(ca.Template, consts.LayoutFile)
hzArgument.CustomizePackage = path.Join(ca.Template, consts.PackageLayoutFile)
} else {
hzArgument.CustomizeLayout = path.Join(tpl.HertzDir, consts.Client, consts.Standard, consts.LayoutFile)
hzArgument.CustomizePackage = path.Join(tpl.HertzDir, consts.Client, consts.Standard, consts.PackageLayoutFile)
}
}
Expand Down
10 changes: 0 additions & 10 deletions tpl/hertz/client/standard/layout.yaml

This file was deleted.

0 comments on commit 56981a4

Please sign in to comment.