fix: use equalFold() instead of lower and compare (#13624)

This commit is contained in:
Harshavardhana
2021-11-10 08:12:50 -08:00
committed by GitHub
parent 03725dc015
commit ea820b30bf
9 changed files with 10 additions and 9 deletions

View File

@@ -110,7 +110,7 @@ func cacheControlOpts(o ObjectInfo) *cacheControl {
var headerVal string
for k, v := range m {
if strings.ToLower(k) == "cache-control" {
if strings.EqualFold(k, "cache-control") {
headerVal = v
}

View File

@@ -47,7 +47,7 @@ func (az *warmBackendAzure) getDest(object string) string {
}
func (az *warmBackendAzure) tier() azblob.AccessTierType {
for _, t := range azblob.PossibleAccessTierTypeValues() {
if strings.ToLower(az.StorageClass) == strings.ToLower(string(t)) {
if strings.EqualFold(az.StorageClass, string(t)) {
return t
}
}