Merge pull request #2206 from carlory/remove-useless-field

remove useless field from CommandGetOptions
This commit is contained in:
karmada-bot 2022-07-19 14:16:44 +08:00 committed by GitHub
commit 7efc6bc2d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -64,7 +64,7 @@ var (
// NewCmdGet New get command
func NewCmdGet(karmadaConfig KarmadaConfig, parentCommand string) *cobra.Command {
ioStreams := genericclioptions.IOStreams{In: getIn, Out: getOut, ErrOut: getErr}
o := NewCommandGetOptions("karmadactl", ioStreams)
o := NewCommandGetOptions(ioStreams)
cmd := &cobra.Command{
Use: "get [NAME | -l label | -n namespace] [flags]",
Short: getShort,
@ -137,10 +137,9 @@ type CommandGetOptions struct {
}
// NewCommandGetOptions returns a GetOptions with default chunk size 500.
func NewCommandGetOptions(parent string, streams genericclioptions.IOStreams) *CommandGetOptions {
func NewCommandGetOptions(streams genericclioptions.IOStreams) *CommandGetOptions {
return &CommandGetOptions{
PrintFlags: get.NewGetPrintFlags(),
CmdParent: parent,
IOStreams: streams,
ChunkSize: 500,
ServerPrint: true,