@@ -104,8 +104,10 @@ func RPCNew(_ *cobra.Command, args []string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// RPCTemplate is the entry for generate rpc template
|
// RPCTemplate is the entry for generate rpc template
|
||||||
func RPCTemplate(_ *cobra.Command, _ []string) error {
|
func RPCTemplate(latest bool) error {
|
||||||
console.Warning("deprecated: goctl rpc template -o is deprecated and will be removed in the future, use goctl rpc -o instead")
|
if !latest {
|
||||||
|
console.Warning("deprecated: goctl rpc template -o is deprecated and will be removed in the future, use goctl rpc -o instead")
|
||||||
|
}
|
||||||
protoFile := VarStringOutput
|
protoFile := VarStringOutput
|
||||||
home := VarStringHome
|
home := VarStringHome
|
||||||
remote := VarStringRemote
|
remote := VarStringRemote
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ var (
|
|||||||
Cmd = &cobra.Command{
|
Cmd = &cobra.Command{
|
||||||
Use: "rpc",
|
Use: "rpc",
|
||||||
Short: "Generate rpc code",
|
Short: "Generate rpc code",
|
||||||
RunE: cli.RPCTemplate,
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
|
return cli.RPCTemplate(true)
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
newCmd = &cobra.Command{
|
newCmd = &cobra.Command{
|
||||||
@@ -23,7 +25,9 @@ var (
|
|||||||
templateCmd = &cobra.Command{
|
templateCmd = &cobra.Command{
|
||||||
Use: "template",
|
Use: "template",
|
||||||
Short: "Generate proto template",
|
Short: "Generate proto template",
|
||||||
RunE: cli.RPCTemplate,
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
|
return cli.RPCTemplate(false)
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
protocCmd = &cobra.Command{
|
protocCmd = &cobra.Command{
|
||||||
|
|||||||
Reference in New Issue
Block a user