Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linter warnings #430

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/cmd/apply/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ cat topics/my_topic.yml | kdef apply - --dry-run`,
SilenceErrors: true,
DisableFlagsInUseLine: true,
Args: cobra.MinimumNArgs(1),
PreRunE: func(_ *cobra.Command, args []string) error {
PreRunE: func(_ *cobra.Command, _ []string) error {
opts.DefinitionFormat = opt.ParseDefinitionFormat(defFormat)
if opts.DefinitionFormat == opt.UnsupportedFormat {
return fmt.Errorf("\"format\" must be one of %q", strings.Join(opt.DefinitionFormatValidValues, "|"))
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/configure/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func Command() *cobra.Command {
SilenceErrors: true,
DisableFlagsInUseLine: true,
Args: cobra.NoArgs,
RunE: func(_ *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
return config.Configure()
},
}
Expand Down
4 changes: 2 additions & 2 deletions cli/cmd/export/acl/acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ kdef export acl --match "myapp.*"`,
SilenceErrors: true,
DisableFlagsInUseLine: true,
Args: cobra.NoArgs,
PreRunE: func(_ *cobra.Command, args []string) error {
PreRunE: func(_ *cobra.Command, _ []string) error {
opts.DefinitionFormat = opt.ParseDefinitionFormat(defFormat)
if opts.DefinitionFormat == opt.UnsupportedFormat {
return fmt.Errorf("\"format\" must be one of %q", strings.Join(opt.DefinitionFormatValidValues, "|"))
Expand All @@ -50,7 +50,7 @@ kdef export acl --match "myapp.*"`,
}
return nil
},
RunE: func(_ *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
cl, err := config.NewClient(cOpts)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions cli/cmd/export/broker/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ kdef export broker --quiet`,
SilenceErrors: true,
DisableFlagsInUseLine: true,
Args: cobra.NoArgs,
PreRunE: func(_ *cobra.Command, args []string) error {
PreRunE: func(_ *cobra.Command, _ []string) error {
opts.DefinitionFormat = opt.ParseDefinitionFormat(defFormat)
if opts.DefinitionFormat == opt.UnsupportedFormat {
return fmt.Errorf("\"format\" must be one of %q", strings.Join(opt.DefinitionFormatValidValues, "|"))
}
return nil
},
RunE: func(_ *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
cl, err := config.NewClient(cOpts)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions cli/cmd/export/brokers/brokers.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ kdef export brokers --quiet`,
SilenceErrors: true,
DisableFlagsInUseLine: true,
Args: cobra.NoArgs,
PreRunE: func(_ *cobra.Command, args []string) error {
PreRunE: func(_ *cobra.Command, _ []string) error {
opts.DefinitionFormat = opt.ParseDefinitionFormat(defFormat)
if opts.DefinitionFormat == opt.UnsupportedFormat {
return fmt.Errorf("\"format\" must be one of %q", strings.Join(opt.DefinitionFormatValidValues, "|"))
}
return nil
},
RunE: func(_ *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
cl, err := config.NewClient(cOpts)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions cli/cmd/export/topic/topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ kdef export topic --match "myapp.*"`,
SilenceErrors: true,
DisableFlagsInUseLine: true,
Args: cobra.NoArgs,
PreRunE: func(_ *cobra.Command, args []string) error {
PreRunE: func(_ *cobra.Command, _ []string) error {
opts.DefinitionFormat = opt.ParseDefinitionFormat(defFormat)
if opts.DefinitionFormat == opt.UnsupportedFormat {
return fmt.Errorf("\"format\" must be one of %q", strings.Join(opt.DefinitionFormatValidValues, "|"))
Expand All @@ -51,7 +51,7 @@ kdef export topic --match "myapp.*"`,
}
return nil
},
RunE: func(_ *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
cl, err := config.NewClient(cOpts)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ kdef configure

Manual: https://peter-evans.github.io/kdef`,
Args: cobra.NoArgs,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
PersistentPreRun: func(_ *cobra.Command, _ []string) {
color.NoColor = noColor
log.Quiet = quiet
if verbose {
Expand Down
Loading