Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cykl committed Sep 5, 2024
1 parent b97f316 commit e91d8ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions internal/global/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ func GetCurrentContext() string {
}

return context
} else {
return configInstance.currentContext()
}

return configInstance.currentContext()
}

func SetCurrentContext(contextName string) error {
Expand Down

0 comments on commit e91d8ba

Please sign in to comment.