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

refactor: Use constants from net/http for HTTP methods instead of hardcoded strings. #1376

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

SahibYar
Copy link
Contributor

This PR introduces the following changes:

Updated occurrences of HTTP methods (e.g., "GET", "POST") with their corresponding constants from the net/http package (e.g., http.MethodGet, http.MethodPost).
Ensures consistency, improves maintainability, and reduces the risk of typos.

Using constants improves code readability and reduces the risk of errors from hardcoded values.

executed make all and the output is same as as main branch

@kpfleming
Copy link
Contributor

Thanks for the PR! I'll be investigating the CI failure tomorrow, it's not related to this PR and it doesn't happen in a local build...

@kpfleming kpfleming changed the title replaced hardcoded strings with http constants refactor: Use constants from net/http for HTTP methods instead of hardcoded strings. Jan 23, 2025
@kpfleming kpfleming merged commit 92feb03 into fastly:main Jan 23, 2025
6 checks passed
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.

3 participants