📒 docs: fix invalid Go slice literal in middleware registration example#4095
Merged
ReneWerner87 merged 2 commits intomainfrom Feb 19, 2026
Merged
📒 docs: fix invalid Go slice literal in middleware registration example#4095ReneWerner87 merged 2 commits intomainfrom
ReneWerner87 merged 2 commits intomainfrom
Conversation
…ation example Co-authored-by: ReneWerner87 <7063188+ReneWerner87@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix invalid Go code in documentation example
📒 docs: fix invalid Go slice literal in middleware registration example
Feb 19, 2026
ReneWerner87
approved these changes
Feb 19, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an invalid Go snippet in the “Middleware registration” section of Fiber’s “What’s new” documentation so the example compiles and matches existing docs conventions.
Changes:
- Replaced non-Go array literal syntax (
["/v1", "/v2"]) with a valid Go slice literal ([]string{"/v1", "/v2"}) in theapp.Usemulti-prefix example.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Middleware Registration" example in
docs/whats_new.mdcontained["/v1", "/v2"]— a non-Go array syntax that does not compile.Changes introduced
["/v1", "/v2"]→[]string{"/v1", "/v2"}in theapp.Usemulti-prefix example indocs/whats_new.md.Type of change
Checklist
/docs/directory for Fiber's documentation.Commit formatting
Please use emojis in commit messages for an easy way to identify the purpose or intention of a commit. Check out the emoji cheatsheet here: CONTRIBUTING.md
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.