mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-30 05:14:54 +00:00
fix missing flag value bindings in kubectl
This commit is contained in:
@@ -85,17 +85,13 @@ func NewCmdExplain(parent string, f cmdutil.Factory, streams genericclioptions.I
|
||||
cmdutil.CheckErr(o.Run(args))
|
||||
},
|
||||
}
|
||||
cmd.Flags().Bool("recursive", false, "Print the fields of fields (Currently only 1 level deep)")
|
||||
cmd.Flags().String("api-version", "", "Get different explanations for particular API version")
|
||||
cmd.Flags().BoolVar(&o.Recursive, "recursive", o.Recursive, "Print the fields of fields (Currently only 1 level deep)")
|
||||
cmd.Flags().StringVar(&o.ApiVersion, "api-version", o.ApiVersion, "Get different explanations for particular API version")
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (o *ExplainOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error {
|
||||
var err error
|
||||
|
||||
o.Recursive = cmdutil.GetFlagBool(cmd, "recursive")
|
||||
o.ApiVersion = cmdutil.GetFlagString(cmd, "api-version")
|
||||
|
||||
o.Mapper, err = f.RESTMapper()
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user