Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uses strings.EqualFold #1790

Merged
merged 1 commit into from
Feb 26, 2021
Merged

Uses strings.EqualFold #1790

merged 1 commit into from
Feb 26, 2021

Conversation

rkilingr
Copy link
Contributor

Changes case insensitive string comparisons to string.EqualFold which performs better than strings.Lower(str) == str comparison

Already covered in test cases:
https://github.com/labstack/echo/blob/master/middleware/basic_auth_test.go#L49
https://github.com/labstack/echo/blob/master/context_test.go#L821

Changes case insensitive string comparisons to string.EqualFold which performs better than strings.Lower(str) == str comparison
@codecov
Copy link

codecov bot commented Feb 24, 2021

Codecov Report

Merging #1790 (5b0b25b) into master (b0f56ea) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1790   +/-   ##
=======================================
  Coverage   89.75%   89.75%           
=======================================
  Files          32       32           
  Lines        2675     2675           
=======================================
  Hits         2401     2401           
  Misses        175      175           
  Partials       99       99           
Impacted Files Coverage Δ
context.go 87.19% <100.00%> (ø)
middleware/basic_auth.go 65.62% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0f56ea...5b0b25b. Read the comment docs.

@aldas aldas merged commit 45870c7 into labstack:master Feb 26, 2021
This was referenced Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants