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

🐛 bug: fix middleware naming and returned values of group methods #2477

Merged
merged 7 commits into from
Jun 5, 2023
Merged

🐛 bug: fix middleware naming and returned values of group methods #2477

merged 7 commits into from
Jun 5, 2023

Conversation

ytsruh
Copy link
Contributor

@ytsruh ytsruh commented May 26, 2023

Description

Edited app.Name() method to add a name parameter to reach route unless already assigned. This required looping over app.stack which feels ineffecient but it was the only method of accessing all of the routes that I could find

Fixes # (issue)
Resolves #2467

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • For new functionalities I follow the inspiration of the express js framework and built them similar in usage
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation - /docs/ directory for https://docs.gofiber.io/
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • If new dependencies exist, I have checked that they are really necessary and agreed with the maintainers/community (we want to have as few dependencies as possible)
  • I tried to make my code as fast as possible with as few allocations as possible
  • For new code I have written benchmarks so that they can be analyzed and improved

Commit formatting:

Use emojis on commit messages so it provides an easy way of identifying the purpose or intention of a commit. Check out the emoji cheatsheet here: https://gitmoji.carloscuesta.me/

@welcome
Copy link

welcome bot commented May 26, 2023

Thanks for opening this pull request! 🎉 Please check out our contributing guidelines. If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

app.go Outdated Show resolved Hide resolved
app_test.go Outdated Show resolved Hide resolved
@ytsruh
Copy link
Contributor Author

ytsruh commented May 26, 2023

Updated to pass lint rules & moved the variable outside of the loop

app.go Outdated Show resolved Hide resolved
@efectn efectn changed the title Bug fix: route names not updating ☢️ bug: fix middleware naming and returned values of group methods Jun 2, 2023
@efectn efectn changed the title ☢️ bug: fix middleware naming and returned values of group methods 🐛 bug: fix middleware naming and returned values of group methods Jun 2, 2023
@efectn efectn requested a review from ReneWerner87 June 2, 2023 16:00
@ReneWerner87
Copy link
Member

Will check it tomorrow

@ReneWerner87 ReneWerner87 merged commit c955d76 into gofiber:master Jun 5, 2023
@welcome
Copy link

welcome bot commented Jun 5, 2023

Congrats on merging your first pull request! 🎉 We here at Fiber are proud of you! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

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.

🐛 [Bug]: Naming for Middlewares
3 participants