add whether to generate rpc client option (#3361)
Co-authored-by: admin <admin@admindeMacBook-Pro.local>
This commit is contained in:
@@ -44,6 +44,8 @@ var (
|
||||
VarBoolVerbose bool
|
||||
// VarBoolMultiple describes whether support generating multiple rpc services or not.
|
||||
VarBoolMultiple bool
|
||||
// VarBoolClient describes whether to generate rpc client
|
||||
VarBoolClient bool
|
||||
)
|
||||
|
||||
// RPCNew is to generate rpc greet service, this greet service can speed
|
||||
@@ -88,6 +90,7 @@ func RPCNew(_ *cobra.Command, args []string) error {
|
||||
ctx.IsGooglePlugin = true
|
||||
ctx.Output = filepath.Dir(src)
|
||||
ctx.ProtocCmd = fmt.Sprintf("protoc -I=%s %s --go_out=%s --go-grpc_out=%s", filepath.Dir(src), filepath.Base(src), filepath.Dir(src), filepath.Dir(src))
|
||||
ctx.IsGenClient = VarBoolClient
|
||||
|
||||
grpcOptList := VarStringSliceGoGRPCOpt
|
||||
if len(grpcOptList) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user