From fc32beb4cdfe6cf0e9aa0e07fd6c874ba38d94d9 Mon Sep 17 00:00:00 2001 From: Shijie Sheng Date: Fri, 15 Jul 2022 19:41:16 -0700 Subject: [PATCH] commit change after lint --- common/reconciliation/invariant/collection_enumer.go | 4 ++-- service/worker/scanner/executions/scantype_enumer.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/reconciliation/invariant/collection_enumer.go b/common/reconciliation/invariant/collection_enumer.go index 18b274bf5d1..1a788beaabb 100644 --- a/common/reconciliation/invariant/collection_enumer.go +++ b/common/reconciliation/invariant/collection_enumer.go @@ -70,8 +70,8 @@ func CollectionString(s string) (Collection, error) { if val, ok := _CollectionNameToValueMap[s]; ok { return val, nil } - s = strings.ToLower(s) - if val, ok := _CollectionNameToValueMap[s]; ok { + + if val, ok := _CollectionNameToValueMap[strings.ToLower(s)]; ok { return val, nil } return 0, fmt.Errorf("%s does not belong to Collection values", s) diff --git a/service/worker/scanner/executions/scantype_enumer.go b/service/worker/scanner/executions/scantype_enumer.go index 9e0504b309d..ae5aaabe732 100644 --- a/service/worker/scanner/executions/scantype_enumer.go +++ b/service/worker/scanner/executions/scantype_enumer.go @@ -70,8 +70,8 @@ func ScanTypeString(s string) (ScanType, error) { if val, ok := _ScanTypeNameToValueMap[s]; ok { return val, nil } - s = strings.ToLower(s) - if val, ok := _ScanTypeNameToValueMap[s]; ok { + + if val, ok := _ScanTypeNameToValueMap[strings.ToLower(s)]; ok { return val, nil } return 0, fmt.Errorf("%s does not belong to ScanType values", s)