From 18bbee82f0d9d092a8d6e757029b35a2c368f352 Mon Sep 17 00:00:00 2001 From: dyhkwong <50692134+dyhkwong@users.noreply.github.com> Date: Mon, 29 Aug 2022 23:03:15 +0800 Subject: [PATCH] Remove strings.ToLower --- route/rule_process_path.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/route/rule_process_path.go b/route/rule_process_path.go index fc9e9ea3..4398f614 100644 --- a/route/rule_process_path.go +++ b/route/rule_process_path.go @@ -27,7 +27,7 @@ func NewProcessPathItem(processNameList []string) *ProcessPathItem { processMap: make(map[string]bool), } for _, processName := range processNameList { - rule.processMap[strings.ToLower(processName)] = true + rule.processMap[processName] = true } return rule } @@ -36,7 +36,7 @@ func (r *ProcessPathItem) Match(metadata *adapter.InboundContext) bool { if metadata.ProcessInfo == nil || metadata.ProcessInfo.ProcessPath == "" { return false } - return r.processMap[strings.ToLower(metadata.ProcessInfo.ProcessPath)] + return r.processMap[metadata.ProcessInfo.ProcessPath] } func (r *ProcessPathItem) String() string {