From ae3d4db9f658259dace9dee515718be7c1b1f517 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 16 Feb 2025 17:31:45 +0100 Subject: [PATCH] cli/command/completion: alias ValidArgsFn instead of strong type This may help with signature changes in Cobra 1.9.0, which defines a new CompletionFunc type. Signed-off-by: Sebastiaan van Stijn --- cli/command/completion/functions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/command/completion/functions.go b/cli/command/completion/functions.go index 7ed09a2ab885..1153ad506a5b 100644 --- a/cli/command/completion/functions.go +++ b/cli/command/completion/functions.go @@ -15,7 +15,7 @@ import ( ) // ValidArgsFn a function to be used by cobra command as `ValidArgsFunction` to offer command line completion -type ValidArgsFn func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) +type ValidArgsFn = func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) // APIClientProvider provides a method to get an [client.APIClient], initializing // it if needed.