Skip to content

chore: Replace http.Method* constants with string literals - #3696

Merged
gmlewis merged 5 commits into
google:masterfrom
jferrl:jferrl-jferrl-3695
Sep 23, 2025
Merged

chore: Replace http.Method* constants with string literals#3696
gmlewis merged 5 commits into
google:masterfrom
jferrl:jferrl-jferrl-3695

Conversation

@jferrl

Copy link
Copy Markdown
Contributor

Updated all usages of http.Method* constants to use string literals for HTTP methods (e.g., "GET", "POST", etc.) throughout the codebase. Added forbidigo linter to enforce this rule and updated .golangci.yml accordingly. This change aligns with new linting requirements and ensures consistency in HTTP method usage.

Updated all usages of http.Method* constants to use string literals for HTTP methods (e.g., "GET", "POST", etc.) throughout the codebase. Added forbidigo linter to enforce this rule and updated .golangci.yml accordingly. This change aligns with new linting requirements and ensures consistency in HTTP method usage.
Comment thread.golangci.yml
@codecov

codecovBot commented Sep 22, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.12%. Comparing base (ffc5df8) to head (661a4ea).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@ Coverage Diff @@## master #3696 +/- ##
=======================================
Coverage 91.12% 91.12% =======================================
Files 187 187 Lines 16640 16640 =======================================
Hits 15164 15164 Misses 1291 1291 Partials 185 185 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gmlewis

Copy link
Copy Markdown
Collaborator

Thank you, @jferrl and @alexandear!
Merging.

@gmlewis

Copy link
Copy Markdown
Collaborator

@jferrl - I apologize - I spoke too soon. I forgot that another PR added forbidigo. Could you please modify this PR by consolidating the two forbidden patterns together into the same rule before I merge to make the linter happy?
Thank you!

Moved forbidigo linter rules to the main settings section for better organization and clarity. No changes to the actual forbidden patterns or messages.
@jferrl

Copy link
Copy Markdown
ContributorAuthor

@jferrl - I apologize - I spoke too soon. I forgot that another PR added forbidigo. Could you please modify this PR by consolidating the two forbidden patterns together into the same rule before I merge to make the linter happy? Thank you!

@gmlewis fixed!

@gmlewis
gmlewis merged commit 9febb45 into google:masterSep 23, 2025
7 checks passed
@gmlewis

Copy link
Copy Markdown
Collaborator

Fixes: #3695.

Sign up for freeto 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.

3 participants

@jferrl@gmlewis@alexandear