feat(goctl/rpc): support external proto imports with cross-package ty… (#5472)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
kesonan
2026-03-22 12:01:20 +08:00
committed by GitHub
parent c12c82b2f6
commit 004995f06a
93 changed files with 4871 additions and 270 deletions

View File

@@ -98,6 +98,7 @@ func RPCNew(_ *cobra.Command, args []string) error {
ctx.IsGenClient = VarBoolClient
ctx.Module = VarStringModule
ctx.NameFromFilename = VarBoolNameFromFilename
ctx.ProtoPaths = []string{filepath.Dir(src)}
grpcOptList := VarStringSliceGoGRPCOpt
if len(grpcOptList) > 0 {

View File

@@ -105,6 +105,7 @@ func ZRPC(_ *cobra.Command, args []string) error {
ctx.IsGenClient = VarBoolClient
ctx.Module = VarStringModule
ctx.NameFromFilename = VarBoolNameFromFilename
ctx.ProtoPaths = VarStringSliceProtoPath
g := generator.NewGenerator(style, verbose)
return g.Generate(&ctx)
}