diff --git a/cmd/root.go b/cmd/root.go index ac36390..9f52f69 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -58,7 +58,7 @@ func NewKafkactlCommand(streams output.IOStreams) *cobra.Command { rootCmd.PersistentFlags().BoolVarP(&globalFlags.Verbose, "verbose", "V", false, "verbose output") rootCmd.PersistentFlags().StringVar(&globalFlags.Context, "context", "", "The name of the context to use") - err := rootCmd.RegisterFlagCompletionFunc("context", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + err := rootCmd.RegisterFlagCompletionFunc("context", func(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) { var contexts []string for k := range viper.GetStringMap("contexts") { contexts = append(contexts, k) diff --git a/internal/global/config.go b/internal/global/config.go index 5484cd5..22bc737 100644 --- a/internal/global/config.go +++ b/internal/global/config.go @@ -64,10 +64,9 @@ func GetCurrentContext() string { } return context - } else { - return configInstance.currentContext() } + return configInstance.currentContext() } func SetCurrentContext(contextName string) error {