Skip to content

Commit

Permalink
Fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-evans committed Feb 15, 2024
1 parent da8fed8 commit b1f926c
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
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

0 comments on commit b1f926c

Please sign in to comment.