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

🎨 Style!: Update CSRF and Limiter to remove repetitive names #2846

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

nickajacks1
Copy link
Member

Description

The exported rule of revive warns to not repeat the package name in method names. For example, prefer csrf.FromCookie over csrf.CsrfFromCookie.

It appears that these issues will not be caught by the linter until the exported rule is reenabled. This requires comments on all exported symbols, which is a much broader effort.

BREAKING CHANGE: This is a breaking change for v3.

Related to #2817

Changes Introduced

List the new features or adjustments introduced in this pull request. Provide details on benchmarks, documentation updates, changelog entries, and if applicable, the migration guide.

  • Documentation Update: Detail the updates made to the documentation and links to the changed files.
  • Changelog/What's New: Include a summary of the additions for the upcoming release notes.
  • Migration Guide: If necessary, provide a guide or steps for users to migrate their existing code to accommodate these changes.
  • API Longevity: Discuss the steps taken to ensure that the new or updated APIs are consistent and not prone to breaking changes.

Users will be required to change to the new function and type names when upgrading to v3. This change is beneficial to API longevity by being more in line with Go style standards.

Type of Change

Please delete options that are not relevant.

  • Documentation update (changes to documentation)
  • Code consistency (non-breaking change which improves code reliability and robustness)

Checklist

Before you submit your pull request, please make sure you meet these requirements:

  • Conducted a self-review of the code and provided comments for complex or critical parts.
  • Updated the documentation in the /docs/ directory for Fiber's documentation.
  • Ensured that new and existing unit tests pass locally with the changes.

The `exported` rule of revive warns to not repeat the package name in
method names. For example, prefer `csrf.FromCookie` over
`csrf.CsrfFromCookie`.

This is a breaking change for v3.

It appears that these issues will not be caught by the linter until the
`exported` rule is reenabled. This requires comments on all exported
symbols, which is a much broader effort.
@ReneWerner87
Copy link
Member

ReneWerner87 commented Feb 10, 2024

similar to the naming in gofiber/contrib#896 👍

@ReneWerner87 ReneWerner87 merged commit 97da409 into gofiber:main Feb 10, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants