From 2c53662c04859c2033a2d5463c6d5e5fa3c755a9 Mon Sep 17 00:00:00 2001 From: Gaurang Kudale Date: Thu, 21 Sep 2023 11:13:22 +0530 Subject: [PATCH] arranging the validation condition sequence --- pkg/cmd/restart.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/cmd/restart.go b/pkg/cmd/restart.go index 2c653f1..8985d57 100644 --- a/pkg/cmd/restart.go +++ b/pkg/cmd/restart.go @@ -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 {