From 690eedc24733104cc9ce8c2754dff3a14dd1a38b Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Fri, 7 Feb 2025 22:19:59 -0700 Subject: [PATCH] Remove support for regex in node and profile argument lists Signed-off-by: Jonathon Anderson --- internal/pkg/node/methods.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/pkg/node/methods.go b/internal/pkg/node/methods.go index a7fc5064..0ad950ad 100644 --- a/internal/pkg/node/methods.go +++ b/internal/pkg/node/methods.go @@ -3,7 +3,6 @@ package node import ( "net" "reflect" - "regexp" "sort" "strings" @@ -40,7 +39,7 @@ func FilterNodeListByName(set []Node, searchList []string) []Node { if len(searchList) > 0 { for _, search := range searchList { for _, entry := range set { - if match, _ := regexp.MatchString("^"+search+"$", entry.id); match { + if entry.id == search { unique[entry.id] = entry } } @@ -67,7 +66,7 @@ func FilterProfileListByName(set []Profile, searchList []string) []Profile { if len(searchList) > 0 { for _, search := range searchList { for _, entry := range set { - if match, _ := regexp.MatchString("^"+search+"$", entry.id); match { + if entry.id == search { unique[entry.id] = entry } }