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: rename error with Err prefix to follow Go conventions #1987

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

huiyifyj
Copy link
Contributor

This change improves code readability and follows better Go naming conventions for error variables.

Replace `strings.Index(str, substr) > -1` with `strings.Contains(str, substr)`
使用 strings.Contains 替代 strings.Index 方法
- Rename JWT error variables with `Err` prefix following Go conventions.
- Improve error messages to be more consistent and lowercase, more to see https://go.dev/wiki/CodeReviewComments#error-strings
- Update JWT error references in middleware
This change improves code readability and follows better Go naming conventions for error variables.
@pixelmaxQm pixelmaxQm changed the base branch from main to dev-2.7.9 January 17, 2025 03:13
@pixelmaxQm pixelmaxQm merged commit 1e727d2 into flipped-aurora:dev-2.7.9 Jan 17, 2025
8 checks passed
@huiyifyj huiyifyj deleted the err-prefix-and-contain branch January 17, 2025 05:35
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.

2 participants