Skip to content

Commit

Permalink
arranging the validation condition sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurangkudale committed Sep 21, 2023
1 parent 66b8b93 commit 2c53662
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/cmd/restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ var rollingRestartCmd = &cobra.Command{

validateInstance := func(input string) error {
_, err := kubernetes.ParseSubject(input)
if err != nil {
return errors.New("Its not a valid Summonplatform or Microservice")
}
if strings.Contains(input, " ") {
return errors.New("Remove white-spaces from input [" + input + "]")
}
if err != nil {
return errors.New("Its not a valid Summonplatform or Microservice")
}
return nil
}
validateInput := func(input string) error {
Expand Down

0 comments on commit 2c53662

Please sign in to comment.