From 6e822ece408cfff179eb1cabaaebc2692809a473 Mon Sep 17 00:00:00 2001 From: shivkumar dudhani Date: Fri, 20 Mar 2020 09:18:15 -0700 Subject: [PATCH] fix CR --- pkg/engine/variables/common.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/engine/variables/common.go b/pkg/engine/variables/common.go index 751040a03d..292b82d988 100644 --- a/pkg/engine/variables/common.go +++ b/pkg/engine/variables/common.go @@ -6,9 +6,5 @@ import "regexp" func IsVariable(element string) bool { validRegex := regexp.MustCompile(variableRegex) groups := validRegex.FindAllStringSubmatch(element, -1) - if len(groups) == 0 { - // there was no match - return false - } - return true + return len(groups) != 0 }