Rename --recurse to --recursive
My muscle memory kicked in (grep, et al), and then I realized the name wasn't quite right. This rights a wrong.
This commit is contained in:
parent
af3949509a
commit
954d594e94
2 changed files with 5 additions and 5 deletions
|
@ -19,7 +19,7 @@ func NewCIDLCCmd() *cobra.Command {
|
|||
var pkgBaseIDL string
|
||||
var pkgBaseRPC string
|
||||
var quiet bool
|
||||
var recurse bool
|
||||
var recursive bool
|
||||
var verbose int
|
||||
cmd := &cobra.Command{
|
||||
Use: "cidlc [pkg-name] [idl-path]",
|
||||
|
@ -53,7 +53,7 @@ func NewCIDLCCmd() *cobra.Command {
|
|||
OutPack: outPack,
|
||||
OutRPC: outRPC,
|
||||
Quiet: quiet,
|
||||
Recurse: recurse,
|
||||
Recursive: recursive,
|
||||
}, path)
|
||||
}),
|
||||
PersistentPostRun: func(cmd *cobra.Command, args []string) {
|
||||
|
@ -64,7 +64,7 @@ func NewCIDLCCmd() *cobra.Command {
|
|||
cmd.PersistentFlags().BoolVar(
|
||||
&logToStderr, "logtostderr", false, "Log to stderr instead of to files")
|
||||
cmd.PersistentFlags().BoolVarP(
|
||||
&recurse, "recurse", "r", false, "Recursively generate code for all sub-packages in the target")
|
||||
&recursive, "recursive", "r", false, "Recursively generate code for all sub-packages in the target")
|
||||
cmd.PersistentFlags().StringVar(
|
||||
&outPack, "out-pack", "", "Save generated package metadata to this directory")
|
||||
cmd.PersistentFlags().StringVar(
|
||||
|
|
|
@ -25,7 +25,7 @@ type CompileOptions struct {
|
|||
OutPack string // the package output location.
|
||||
OutRPC string // the RPC output location.
|
||||
Quiet bool // true to suppress innocuous output messages.
|
||||
Recurse bool // true to generate code for all sub-packages.
|
||||
Recursive bool // true to generate code for all sub-packages.
|
||||
}
|
||||
|
||||
// Compile runs the Go compiler against an IDL project and then generates code for the resulting program.
|
||||
|
@ -67,7 +67,7 @@ func Compile(opts CompileOptions, path string) error {
|
|||
}
|
||||
|
||||
var inputs []string
|
||||
if opts.Recurse {
|
||||
if opts.Recursive {
|
||||
if inp, err := gatherGoPackages(path); err != nil {
|
||||
return err
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue