Skip to content

Commit

Permalink
fix: remove validation
Browse files Browse the repository at this point in the history
  • Loading branch information
rkpattnaik780 committed Jul 9, 2021
1 parent 6ce22de commit d05b88e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 48 deletions.
10 changes: 0 additions & 10 deletions pkg/cmd/kafka/consumergroup/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/redhat-developer/app-services-cli/pkg/cmd/flag"
"github.com/redhat-developer/app-services-cli/pkg/cmdutil"
flagutil "github.com/redhat-developer/app-services-cli/pkg/cmdutil/flags"
consumergrouputil "github.com/redhat-developer/app-services-cli/pkg/kafka/consumergroup"

"github.com/redhat-developer/app-services-cli/pkg/connection"
"github.com/redhat-developer/app-services-cli/pkg/dump"
Expand Down Expand Up @@ -75,15 +74,6 @@ func NewListConsumerGroupCommand(f *factory.Factory) *cobra.Command {
return fmt.Errorf(opts.localizer.MustLocalize("kafka.consumerGroup.common.error.noKafkaSelected"))
}

if opts.search != "" {
validator := &consumergrouputil.Validator{
Localizer: opts.localizer,
}
if err = validator.ValidateSearchInput(opts.search); err != nil {
return err
}
}

opts.kafkaID = cfg.Services.Kafka.ClusterID

return runList(opts)
Expand Down
33 changes: 0 additions & 33 deletions pkg/kafka/consumergroup/validators.go

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,4 @@ one = 'no Kafka instance is currently selected, run "rhoas kafka use" to set the
one = 'you are unauthorized to {{.Operation}} these consumer groups'

[kafka.consumerGroup.list.error.forbidden]
one = 'you are forbidden to {{.Operation}} these consumer groups'

[kafka.consumerGroup.list.error.illegalSearchValue]
description = 'Error message when invalid chars are used for search flag'
one = 'illegal search value "{{.Search}}"; only letters (Aa-Zz), numbers and "-" are accepted'
one = 'you are forbidden to {{.Operation}} these consumer groups'

0 comments on commit d05b88e

Please sign in to comment.