From 34a216fe6778815dd76be628b9148e85c2af07fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 22 Jan 2018 11:29:02 +0100 Subject: [PATCH] resource: Avoid some strings.ToLower in globbing See #4301 --- Gopkg.lock | 2 +- resource/resource.go | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index e7d14c5e3..182d8e555 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -381,6 +381,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "3bd32a09fb219b2cddf0e5a91110430a05bfd2d3a28215c69b8013ff2b6b89dc" + inputs-digest = "c80ffe69d34005d8d72a87cc491ce1d9c91272e4b7f8fbd22d4fda8973fa8556" solver-name = "gps-cdcl" solver-version = 1 diff --git a/resource/resource.go b/resource/resource.go index a2128bdc7..b785cb2be 100644 --- a/resource/resource.go +++ b/resource/resource.go @@ -191,8 +191,6 @@ var ( ) func getGlob(pattern string) (glob.Glob, error) { - pattern = strings.ToLower(pattern) - var g glob.Glob globMu.RLock() @@ -200,7 +198,7 @@ func getGlob(pattern string) (glob.Glob, error) { globMu.RUnlock() if !found { var err error - g, err = glob.Compile(pattern, '/') + g, err = glob.Compile(strings.ToLower(pattern), '/') if err != nil { return nil, err }