From 063627e42fc4b04c0a0d1ed6d8581d08bb1dd9c2 Mon Sep 17 00:00:00 2001 From: Kamandlou Date: Mon, 23 Sep 2024 17:21:57 +0330 Subject: [PATCH] update: `cobra.ExactValidArgs` method is deprecated Signed-off-by: Kamandlou --- etcdctl/ctlv3/command/completion_command.go | 2 +- etcdutl/etcdutl/completion_commmand.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etcdctl/ctlv3/command/completion_command.go b/etcdctl/ctlv3/command/completion_command.go index 66a213cd3a6..cb98d4a7d69 100644 --- a/etcdctl/ctlv3/command/completion_command.go +++ b/etcdctl/ctlv3/command/completion_command.go @@ -65,7 +65,7 @@ PowerShell: `, DisableFlagsInUseLine: true, ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, - Args: cobra.ExactValidArgs(1), + Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs), Run: func(cmd *cobra.Command, args []string) { switch args[0] { case "bash": diff --git a/etcdutl/etcdutl/completion_commmand.go b/etcdutl/etcdutl/completion_commmand.go index 792799b15b0..b723337e1a8 100644 --- a/etcdutl/etcdutl/completion_commmand.go +++ b/etcdutl/etcdutl/completion_commmand.go @@ -65,7 +65,7 @@ PowerShell: `, DisableFlagsInUseLine: true, ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, - Args: cobra.ExactValidArgs(1), + Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs), Run: func(cmd *cobra.Command, args []string) { switch args[0] { case "bash":