Skip to content

Conversation

@ReneWerner87
Copy link
Member

@ReneWerner87 ReneWerner87 commented Oct 17, 2025

Summary

  • bump the module path to /v3, require Go 1.25, and depend on Fiber v3.0.0-rc.2
  • update middleware imports, tests, and README usage docs for the new major version
  • document ignoring the vendor directory so vendored code is no longer tracked

Testing

  • go test ./... (fails: unable to download Go 1.25 toolchain in the restricted environment)

https://chatgpt.com/codex/tasks/task_e_68f223254d688326a429427d06c31d16

Summary by CodeRabbit

  • Documentation

    • Added version compatibility notes: targets Fiber v3 and requires Go 1.25+
    • Updated examples, usage steps, and import paths to reflect v3
    • Clarified installation instructions and refreshed related docs
  • Chores

    • Migrated framework dependency references to Fiber v3
    • Clarified vendoring comment in repository ignore settings

@github-actions github-actions bot added the ✏️ Feature New feature or request label Oct 17, 2025
@gemini-code-assist
Copy link

Summary of Changes

Hello @ReneWerner87, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request prepares the gofiber/swagger middleware for compatibility with Fiber v3. It involves a significant upgrade to the module's versioning, updating its Go language requirement, and aligning its dependencies with the new Fiber framework. The changes ensure that the Swagger integration remains functional and up-to-date with the latest ecosystem standards.

Highlights

  • Module Path and Dependencies: The module path has been bumped to /v3, requiring Go 1.25, and now depends on Fiber v3.0.0-rc.2 for compatibility with the latest Fiber framework.
  • Codebase and Documentation Updates: Middleware imports, tests, and README usage documentation have been updated to reflect the new major version and its associated changes.
  • Vendor Directory Exclusion: The .gitignore file has been updated to explicitly ignore the vendor directory, ensuring vendored code is no longer tracked in version control.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link

coderabbitai bot commented Oct 17, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Updates import paths and documentation to target Fiber v3 and swagger v3 across README, source, and tests; clarifies a .gitignore comment about vendored dependencies. No behavioral or API-signature changes detected.

Changes

Cohort / File(s) Summary
Configuration & Gitignore
\.gitignore
Rewrote comment to "Vendored dependencies managed via Go modules" while keeping vendor/ entry.
Documentation / Examples
README.md
Updated examples and instructions to reference Fiber v3 and Swagger v3 paths and to require Go 1.25+; adjusted Swag installation and example import paths to v3.
Source & Tests
swagger.go, swagger_test.go
Replaced import paths from github.com/gofiber/fiber/v2 and related v2 packages to their v3 equivalents (fiber/v3, swagger/v3, filesystem, utils). No logic or signature changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I hopped from v2 down a tidy line,

Switched my imports so everything's fine.
README polished, tests now in view,
Vendored note tweaked — all shiny and new.
✨ Hooray for small, neat updates — from me, a rabbit, to you!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "feat: prepare swagger v3 for Fiber v3" directly and accurately describes the main objective of the changeset. All modifications across the files (.gitignore, README.md, swagger.go, and swagger_test.go) consistently contribute to this single, well-defined goal: upgrading the swagger package to support Fiber v3, including updating the module path to /v3, requiring Go 1.25, and updating all imports and documentation accordingly. The title is concise, specific, and uses conventional commit formatting while clearly communicating the primary change without unnecessary noise or vagueness.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/2025-10-17-11-13-17

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively prepares the swagger middleware for Fiber v3 by updating the module path, Go version requirement, and dependencies. The documentation and examples are also updated to reflect these changes. My review includes a suggestion to fix inconsistent formatting in a code example within the README and a more critical note about an incomplete go.sum file which needs to be addressed to ensure the project can be built successfully by others.


require (
github.com/gofiber/fiber/v2 v2.52.6
github.com/gofiber/fiber/v3 v3.0.0-rc.2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While the fiber dependency has been correctly updated to v3.0.0-rc.2, the go.sum file has not been updated accordingly. It's missing the checksums for the new dependency. Please run go mod tidy to ensure go.sum is complete and correct. An incomplete go.sum will cause build failures for others.

Comment on lines 43 to 50
import (
"github.com/gofiber/swagger"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/swagger/v3"
"github.com/gofiber/fiber/v3"

// docs are generated by Swag CLI, you have to import them.
// replace with your own docs folder, usually "github.com/username/reponame/docs"
_ "github.com/gofiber/swagger/example/docs"
_ "github.com/gofiber/swagger/v3/example/docs"
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The indentation in this Go code example is inconsistent. Some lines use spaces while others use tabs. It's best practice to format Go code with gofmt, which uses tabs for indentation. This will improve readability and consistency.

Suggested change
import (
"github.com/gofiber/swagger"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/swagger/v3"
"github.com/gofiber/fiber/v3"
// docs are generated by Swag CLI, you have to import them.
// replace with your own docs folder, usually "github.com/username/reponame/docs"
_ "github.com/gofiber/swagger/example/docs"
_ "github.com/gofiber/swagger/v3/example/docs"
)
import (
"github.com/gofiber/swagger/v3"
"github.com/gofiber/fiber/v3"
// docs are generated by Swag CLI, you have to import them.
// replace with your own docs folder, usually "github.com/username/reponame/docs"
_ "github.com/gofiber/swagger/v3/example/docs"
)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
README.md (2)

32-32: Minor: Fix grammar in documentation.

The phrase "import following" is grammatically incomplete.

Apply this diff to improve readability:

-And import following in your code:
+And import the following in your code:

47-48: Minor: Replace hard tabs with spaces.

Lines 47-48 use hard tabs instead of spaces, which is inconsistent with Markdown conventions.

Apply this diff to use spaces consistently:

-	// docs are generated by Swag CLI, you have to import them.
-	// replace with your own docs folder, usually "github.com/username/reponame/docs"
+    // docs are generated by Swag CLI, you have to import them.
+    // replace with your own docs folder, usually "github.com/username/reponame/docs"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6ced278 and 4bae034.

⛔ Files ignored due to path filters (2)
  • go.mod is excluded by !**/*.mod
  • go.sum is excluded by !**/*.sum, !**/*.sum
📒 Files selected for processing (4)
  • .gitignore (1 hunks)
  • README.md (3 hunks)
  • swagger.go (1 hunks)
  • swagger_test.go (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-11-15T07:56:21.623Z
Learnt from: ReneWerner87
PR: gofiber/fiber#3161
File: app.go:923-932
Timestamp: 2024-11-15T07:56:21.623Z
Learning: In the Fiber framework, breaking changes are acceptable when moving from version 2 to version 3, including modifications to method signatures such as in the `Test` method in `app.go`.

Applied to files:

  • swagger_test.go
  • swagger.go
🪛 GitHub Actions: Tests
swagger.go

[error] 11-11: missing go.sum entry for module providing package github.com/gofiber/fiber/v3 (imported by github.com/gofiber/swagger/v3); to add: go mod tidy

🪛 GitHub Check: golangci
swagger.go

[failure] 11-11: [golangci] swagger.go#L11
could not import github.com/gofiber/fiber/v3 (swagger.go:11:2: missing go.sum entry for module providing package github.com/gofiber/fiber/v3 (imported by github.com/gofiber/swagger/v3); to add:


[failure] 12-12: [golangci] swagger.go#L12
could not import github.com/gofiber/fiber/v3/middleware/filesystem (swagger.go:12:2: missing go.sum entry for module providing package github.com/gofiber/fiber/v3/middleware/filesystem (imported by github.com/gofiber/swagger/v3); to add:


[failure] 13-13: [golangci] swagger.go#L13
could not import github.com/gofiber/fiber/v3/utils (swagger.go:13:2: missing go.sum entry for module providing package github.com/gofiber/fiber/v3/utils (imported by github.com/gofiber/swagger/v3); to add:

🪛 GitHub Check: Tests (1.20.x, ubuntu-latest)
swagger.go

[failure] 13-13:
missing go.sum entry for module providing package github.com/gofiber/fiber/v3/utils (imported by github.com/gofiber/swagger/v3); to add:


[failure] 12-12:
missing go.sum entry for module providing package github.com/gofiber/fiber/v3/middleware/filesystem (imported by github.com/gofiber/swagger/v3); to add:


[failure] 11-11:
missing go.sum entry for module providing package github.com/gofiber/fiber/v3 (imported by github.com/gofiber/swagger/v3); to add:

🪛 GitHub Check: Tests (1.21.x, ubuntu-latest)
swagger.go

[failure] 13-13:
missing go.sum entry for module providing package github.com/gofiber/fiber/v3/utils (imported by github.com/gofiber/swagger/v3); to add:


[failure] 12-12:
missing go.sum entry for module providing package github.com/gofiber/fiber/v3/middleware/filesystem (imported by github.com/gofiber/swagger/v3); to add:


[failure] 11-11:
missing go.sum entry for module providing package github.com/gofiber/fiber/v3 (imported by github.com/gofiber/swagger/v3); to add:

🪛 LanguageTool
README.md

[grammar] ~32-~32: There might be a mistake here.
Context: ...u github.com/gofiber/swagger/v3 And import following in your code: go import "...

(QB_NEW_EN)

🪛 markdownlint-cli2 (0.18.1)
README.md

47-47: Hard tabs
Column: 1

(MD010, no-hard-tabs)


48-48: Hard tabs
Column: 1

(MD010, no-hard-tabs)

🔇 Additional comments (5)
swagger_test.go (1)

8-8: LGTM! Import path updated correctly.

The Fiber v3 import path is correct. The test usage patterns (fiber.New(), app.Get(), app.Test()) appear compatible with v3 based on the migration.

.gitignore (1)

14-14: LGTM! Comment clarification improves documentation.

The updated comment more accurately describes that vendored dependencies are managed via Go modules, which is clearer than the previous generic text.

README.md (2)

9-13: LGTM! Clear documentation of v3 requirements.

The added note clearly communicates that v3 targets Fiber v3 (v3.0.0-rc.2) and requires Go 1.25 or newer, which is essential information for users.


30-30: LGTM! Import paths correctly updated to v3.

All import path references have been consistently updated to reflect the v3 module path (github.com/gofiber/swagger/v3 and github.com/gofiber/fiber/v3).

Also applies to: 35-35, 44-45, 49-49

swagger.go (1)

11-13: No action needed — the code is already correctly migrated to fiber v3.

The review comment appears outdated. Verification confirms:

  • All imports in swagger.go are v3 (lines 11-13) ✓
  • go.mod properly declares fiber/v3 dependencies ✓
  • go.sum exists and is populated with 92 entries—no missing dependencies ✓
  • All remaining code uses v3-compatible APIs (filesystem.New, c.Path, utils.CopyString) ✓
  • No v2 references remain in the codebase ✓

The recent commit "chore: upgrade to fiber v3" shows changes have already been properly applied. Running go mod tidy is unnecessary.

Likely an incorrect or invalid review comment.

Comment on lines +11 to +13
"github.com/gofiber/fiber/v3"
"github.com/gofiber/fiber/v3/middleware/filesystem"
"github.com/gofiber/fiber/v3/utils"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify API compatibility with Fiber v3.

The import paths have been updated correctly. However, ensure that the Fiber v3 APIs used in this file (filesystem middleware at line 37, Ctx methods at lines 58-73, and utils at line 58) remain compatible with v3.

Based on learnings, Fiber v3 introduces several API changes including router signature changes and the extractors package for middleware. Please verify that:

  1. The filesystem middleware configuration (line 37) is compatible with v3
  2. Ctx methods like c.Route().Path, c.Path(), c.Params(), c.Type(), c.Redirect() work as expected in v3
  3. The utils.CopyString() function is available in v3

Run the tests after go mod tidy to confirm compatibility:


🏁 Script executed:

#!/bin/bash
# Run tests with v3 dependencies
go mod tidy && go test -v ./...

Length of output: 93



🏁 Script executed:

#!/bin/bash
# Find go.mod file in the repository
echo "=== Locating go.mod file ==="
fd -H "go.mod$" -t f

echo ""
echo "=== Locating swagger.go file ==="
fd -H "swagger.go$" -t f

echo ""
echo "=== Repository structure (first 2 levels) ==="
find . -maxdepth 2 -type f -name "*.go" | head -20

Length of output: 181



🏁 Script executed:

#!/bin/bash
# Examine swagger.go content
echo "=== Full swagger.go content ==="
cat swagger.go

echo ""
echo "=== Go.mod for dependency info ==="
cat go.mod

Length of output: 3384



🌐 Web query:

Fiber v3 Ctx Route Path method API

💡 Result:

Short summary — Fiber v3 Ctx API for route/path/method:

  • c.Route() — returns the matched *Route (contains fields like Method, Path, Params, Handlers). Note: in middleware before c.Next() it returns the last executed route. [1]
  • c.Path(override ...string) string — get (or override by passing a string) the path part of the request. Use c.Path("/new") plus c.RestartRouting() for internal redirects. [1]
  • c.Method(override ...string) string — get the HTTP method (GET/POST/...) or override it by passing a string. [1]
  • Typical usage: inside a handler c.Route().Path, c.Path(), c.Method() to inspect or modify routing/behavior. [1][2]

Docs: Fiber Ctx reference (Ctx.Route / Path / Method) and App routing docs. [1] https://docs.gofiber.io/api/ctx [2] https://docs.gofiber.io/next/api/app



🌐 Web query:

Fiber v3 Ctx Params Type Redirect Redirect method

💡 Result:

Short summary (Fiber v3)

  • Params:
    func (c *Ctx) Params(key string, defaultValue ...string) string. Returns route param (default "" if missing). [1]

  • Redirect (simple):
    func (c *Ctx) Redirect(location string, status ...int) error — redirects to location; status defaults to 302/Found (use 303/307/308 to preserve method). [2]

  • Redirect helper (chainable API):
    func (c *DefaultCtx) Redirect() *Redirect — returns a Redirect object with methods:

    • (*Redirect) To(location string) error
    • (*Redirect) Route(name string, config ...RedirectConfig) error
    • (*Redirect) Back(fallback ...string) error
    • (*Redirect) Status(code int) *Redirect
    • (*Redirect) With(key, value string, level ...uint8) *Redirect
    • (*Redirect) WithInput() *Redirect
      RedirectConfig includes Params (fiber.Map) and Queries (map[string]string). [3]

Sources: Fiber docs and pkg reference. [1] [2] [3]



🌐 Web query:

Fiber v3 Ctx Type method content-type

💡 Result:

Short answer: In GoFiber v3 use c.Type(ext, charset...) to set the response Content-Type by extension (e.g. "json", ".html", "png"). It returns *Ctx so it's chainable. Example:

app.Get("/", func(c *fiber.Ctx) error {
c.Type("json", "utf-8") // sets Content-Type: application/json; charset=utf-8
return c.JSON(fiber.Map{"ok": true})
})

Notes:

  • You may also set any header directly with c.Set("Content-Type", "..."). [1][2]

Sources:
[1] Fiber Ctx API — Type, Set, Is, JSON docs.
[2] pkg.go.dev github.com/gofiber/fiber/v3 (response helpers / defaults).



🌐 Web query:

Fiber v3 filesystem middleware Config Root

💡 Result:

Short answer: In Fiber v3 the old middleware/filesystem was replaced by the new static middleware. Instead of Config.Root (http.FileSystem) on filesystem.Config you now pass the filesystem path or an fs.FS to static.New — or use the contrib/filesystem package which still accepts an http.FileSystem Root. Example usages:

  • static middleware (v3) — pass a root path or os.DirFS:
    app.Get("/*", static.New("./public")) [1]

    or with fs.FS:
    app.Get("/*", static.New("", static.Config{ FS: os.DirFS("./public") })) [1]

  • legacy filesystem middleware (v2 / contrib) — expects Config.Root (http.FileSystem):
    app.Use(filesystem.New(filesystem.Config{ Root: http.FS(embedFS), PathPrefix: "build", Browse: true })) [2]

Reference: Fiber v3 static docs and v3 "What's New" (filesystem -> static), and v2 filesystem Config docs. [1] [3] [2]



🌐 Web query:

Fiber v3 middleware filesystem package deprecated removed

💡 Result:

Short answer: Fiber v3 removed the middleware/filesystem package — you should use the static middleware (static.New with FS: os.DirFS / http.FS / embed.FS or static.Config) instead. See the v3 "What's New" / migration notes and the static middleware docs for examples. [1][2][3]

References:

  • What's New / Migration (notes that filesystem was removed and shows migration examples). [1]
  • Filesystem middleware (v2 reference). [2]
  • Static middleware (v3/next docs showing os.DirFS/http.FS usage). [3]


🌐 Web query:

Fiber v3 contrib filesystem middleware package

💡 Result:

In Fiber v3 the old filesystem middleware was removed from the core — use the new static middleware (which covers filesystem use-cases) or mount an http.FileSystem via static.Config.FS. See Fiber v3 notes and the static middleware docs for examples. [1][2]

Sources:
[1] Fiber v3 "What's New" (Filesystem removed / migrate to static). [2] Fiber static middleware docs (usage + FS example).



🌐 Web query:

Fiber v3 utils CopyString function

💡 Result:

CopyString (in gofiber/utils) makes a heap-allocated copy of a context-derived string by copying its underlying bytes into a new []byte and converting that to string — so the result won't be overwritten by future requests. In practice it does the same as:

buffer := make([]byte, len(s))
copy(buffer, s)
return string(buffer)

In Fiber v3 the utils helpers (including utils.CopyString) are provided from the external module github.com/gofiber/utils/v2. [1][2]

Sources:
[1] Fiber docs — example & CopyString explanation. [2] Fiber v3 “What’s New” / utils migration (notes that CopyString → utils.CopyString and import path).


The filesystem middleware was removed in Fiber v3 and must be updated.

The Ctx methods (c.Route().Path, c.Path(), c.Params(), c.Type(), c.Redirect()) and utils.CopyString() are compatible with Fiber v3. However, the import at line 12 (github.com/gofiber/fiber/v3/middleware/filesystem) no longer exists in v3—the filesystem middleware was removed and replaced with the static middleware.

Line 37's filesystem.New(filesystem.Config{Root: http.FS(swaggerFiles.FS)}) must be refactored to use the static middleware API instead.

🧰 Tools
🪛 GitHub Actions: Tests

[error] 11-11: missing go.sum entry for module providing package github.com/gofiber/fiber/v3 (imported by github.com/gofiber/swagger/v3); to add: go mod tidy

🪛 GitHub Check: golangci

[failure] 11-11: [golangci] swagger.go#L11
could not import github.com/gofiber/fiber/v3 (swagger.go:11:2: missing go.sum entry for module providing package github.com/gofiber/fiber/v3 (imported by github.com/gofiber/swagger/v3); to add:


[failure] 12-12: [golangci] swagger.go#L12
could not import github.com/gofiber/fiber/v3/middleware/filesystem (swagger.go:12:2: missing go.sum entry for module providing package github.com/gofiber/fiber/v3/middleware/filesystem (imported by github.com/gofiber/swagger/v3); to add:


[failure] 13-13: [golangci] swagger.go#L13
could not import github.com/gofiber/fiber/v3/utils (swagger.go:13:2: missing go.sum entry for module providing package github.com/gofiber/fiber/v3/utils (imported by github.com/gofiber/swagger/v3); to add:

🪛 GitHub Check: Tests (1.20.x, ubuntu-latest)

[failure] 13-13:
missing go.sum entry for module providing package github.com/gofiber/fiber/v3/utils (imported by github.com/gofiber/swagger/v3); to add:


[failure] 12-12:
missing go.sum entry for module providing package github.com/gofiber/fiber/v3/middleware/filesystem (imported by github.com/gofiber/swagger/v3); to add:


[failure] 11-11:
missing go.sum entry for module providing package github.com/gofiber/fiber/v3 (imported by github.com/gofiber/swagger/v3); to add:

🪛 GitHub Check: Tests (1.21.x, ubuntu-latest)

[failure] 13-13:
missing go.sum entry for module providing package github.com/gofiber/fiber/v3/utils (imported by github.com/gofiber/swagger/v3); to add:


[failure] 12-12:
missing go.sum entry for module providing package github.com/gofiber/fiber/v3/middleware/filesystem (imported by github.com/gofiber/swagger/v3); to add:


[failure] 11-11:
missing go.sum entry for module providing package github.com/gofiber/fiber/v3 (imported by github.com/gofiber/swagger/v3); to add:

🤖 Prompt for AI Agents
In swagger.go lines 11-13 and around line 37, replace the removed filesystem
middleware import with Fiber's static middleware import
(github.com/gofiber/fiber/v3/middleware/static) and refactor the middleware
construction: remove filesystem.New(...) and instantiate the static middleware
using the static package's Config that accepts the same root FS
(http.FS(swaggerFiles.FS)); update the route/middleware registration to use
static.New with that Config. Ensure the old filesystem import is deleted and any
filesystem.* references are replaced with static.*.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
README.md (1)

44-49: Fix inconsistent indentation in Go code example.

The Go code example has mixed indentation: line 44 uses spaces while lines 47–49 use tabs. Go conventions (enforced by gofmt) require tabs exclusively. This was also flagged in a previous review and remains unaddressed.

Apply this diff to standardize indentation with tabs:

 import (
-        "github.com/gofiber/swagger/v3"
-        "github.com/gofiber/fiber/v3"
+	"github.com/gofiber/swagger/v3"
+	"github.com/gofiber/fiber/v3"
 
 	// docs are generated by Swag CLI, you have to import them.
 	// replace with your own docs folder, usually "github.com/username/reponame/docs"
-        _ "github.com/gofiber/swagger/v3/example/docs"
+	_ "github.com/gofiber/swagger/v3/example/docs"
 )
🧹 Nitpick comments (1)
README.md (1)

32-32: Minor grammar fix: add "the" before "following".

Line 32 reads "And import following in your code:" but should be "And import the following in your code:" for grammatical correctness.

Apply this diff to fix the grammar:

-And import following in your code:
+And import the following in your code:
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4bae034 and 9c9312d.

⛔ Files ignored due to path filters (2)
  • .github/workflows/gotidy.yml is excluded by !**/*.yml
  • .github/workflows/test.yml is excluded by !**/*.yml
📒 Files selected for processing (1)
  • README.md (3 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[grammar] ~17-~17: There might be a mistake here.
Context: ...waggo/swag#declarative-comments-format). 2. Download [Swag](https://github.com/swagg...

(QB_NEW_EN)


[grammar] ~32-~32: There might be a mistake here.
Context: ...u github.com/gofiber/swagger/v3 And import following in your code: go import "...

(QB_NEW_EN)

🪛 markdownlint-cli2 (0.18.1)
README.md

47-47: Hard tabs
Column: 1

(MD010, no-hard-tabs)


48-48: Hard tabs
Column: 1

(MD010, no-hard-tabs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex ✏️ Feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants