delete unused parameter
Signed-off-by: hanweisen <hanweisen_yewu@cmss.chinamobile.com>
This commit is contained in:
parent
c5dc4f947c
commit
b8abd537fb
|
@ -39,7 +39,7 @@ func NewCmdDescribe(karmadaConfig KarmadaConfig, parentCommand string) *cobra.Co
|
|||
SilenceUsage: true,
|
||||
Example: describeExample(parentCommand),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
if err := o.Complete(karmadaConfig, cmd, args); err != nil {
|
||||
if err := o.Complete(karmadaConfig, args); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := o.Run(); err != nil {
|
||||
|
@ -107,7 +107,7 @@ func describeExample(parentCommand string) string {
|
|||
}
|
||||
|
||||
// Complete ensures that options are valid and marshals them if necessary
|
||||
func (o *CommandDescribeOptions) Complete(karmadaConfig KarmadaConfig, cmd *cobra.Command, args []string) error {
|
||||
func (o *CommandDescribeOptions) Complete(karmadaConfig KarmadaConfig, args []string) error {
|
||||
var err error
|
||||
|
||||
if len(o.Cluster) == 0 {
|
||||
|
|
|
@ -48,7 +48,7 @@ func NewCmdExec(karmadaConfig KarmadaConfig, parentCommand string) *cobra.Comman
|
|||
Example: execExample(parentCommand),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
argsLenAtDash := cmd.ArgsLenAtDash()
|
||||
if err := o.Complete(karmadaConfig, cmd, args, argsLenAtDash); err != nil {
|
||||
if err := o.Complete(karmadaConfig, args, argsLenAtDash); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := o.Validate(cmd); err != nil {
|
||||
|
@ -159,7 +159,7 @@ type ExecOptions struct {
|
|||
}
|
||||
|
||||
// Complete verifies command line arguments and loads data from the command environment
|
||||
func (p *ExecOptions) Complete(karmadaConfig KarmadaConfig, cmd *cobra.Command, argsIn []string, argsLenAtDash int) error {
|
||||
func (p *ExecOptions) Complete(karmadaConfig KarmadaConfig, argsIn []string, argsLenAtDash int) error {
|
||||
if len(argsIn) > 0 && argsLenAtDash != 0 {
|
||||
p.ResourceName = argsIn[0]
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ func NewCmdGet(karmadaConfig KarmadaConfig, parentCommand string) *cobra.Command
|
|||
SilenceUsage: true,
|
||||
Example: getExample(parentCommand),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
if err := o.Complete(cmd, args); err != nil {
|
||||
if err := o.Complete(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := o.Validate(cmd); err != nil {
|
||||
|
@ -152,7 +152,7 @@ func NewCommandGetOptions(parent string, streams genericclioptions.IOStreams) *C
|
|||
}
|
||||
|
||||
// Complete takes the command arguments and infers any remaining options.
|
||||
func (g *CommandGetOptions) Complete(cmd *cobra.Command, args []string) error {
|
||||
func (g *CommandGetOptions) Complete() error {
|
||||
newScheme := gclient.NewSchema()
|
||||
|
||||
templateArg := ""
|
||||
|
|
Loading…
Reference in New Issue