Skip to content

Conversation

@ReneWerner87
Copy link
Member

@ReneWerner87 ReneWerner87 commented Oct 17, 2025

Summary

  • update the main README to instruct users to install Fiber v3
  • refresh each engine README example to import github.com/gofiber/fiber/v3

Testing

  • go test ./...

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

Summary by CodeRabbit

  • New Features

    • Templates now accept a wider range of input data formats, improving binding flexibility.
  • Chores

    • Documentation and examples updated to v3/v4 package versions and refreshed installation guidance.
    • Example handler signatures and layout usage updated for clarity.
    • Go version guidance updated to support the latest two releases.
  • Tests

    • Tests updated for new binding behavior and improved output normalization.

@ReneWerner87 ReneWerner87 requested a review from a team as a code owner October 17, 2025 10:30
@ReneWerner87 ReneWerner87 requested review from gaby and sixcolors and removed request for a team October 17, 2025 10:30
@ReneWerner87 ReneWerner87 requested a review from efectn October 17, 2025 10:30
@github-actions github-actions bot added the 📒 Documentation Improvements or additions to documentation label Oct 17, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 17, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (2)
  • .github/workflows/golangci-lint.yml is excluded by !**/*.yml
  • .golangci.yml is excluded by !**/*.yml

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

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

This PR centralizes binding normalization with a new AcquireViewContext(binding) using reflection, updates README examples and imports to Fiber v3 and template v2/v3 paths, and refactors several template engines and tests to use the new helper instead of ad-hoc type switches.

Changes

Cohort / File(s) Summary
Top-level README
README.md
Updated docs link to v2/v3 paths, bumped examples to v3 imports, and minor formatting tweaks.
README examples (engines)
ace/README.md, amber/README.md, django/README.md, handlebars/README.md, html/README.md, jet/README.md, mustache/README.md, pug/README.md, slim/README.md
Added Installation sections, updated example imports to github.com/gofiber/fiber/v3 and template module v3 paths, changed example handler signatures from *fiber.Ctxfiber.Ctx, and adjusted some Render/layout example arguments.
Template core import updates (engines)
ace/ace.go, amber/amber.go, html/html.go, pug/pug.go, slim/slim.go
Switched internal imports from github.com/gofiber/templategithub.com/gofiber/template/v2 (package identity change; no other logic edits).
Binding normalization API
template.go
Added exported AcquireViewContext(binding interface{}) map[string]interface{} implemented with reflection to normalize pointers, maps, and map-like inputs into a map[string]interface{}.
Engines refactored to use AcquireViewContext
handlebars/handlebars.go, jet/jet.go, mustache/mustache.go, django/django.go
Removed ad-hoc type-switching and fiber-specific binding handling; now acquire a normalized view context via core.AcquireViewContext(binding) and use it to populate engine-specific contexts.
Django engine and tests
django/django.go, django/django_test.go
Reworked getPongoBinding to accept arbitrary map-like inputs via reflection, added sanitizePongoContext(data map[string]interface{}) pongo2.Context; tests replace fiber.Map with a local customMap type.
Tests adjustments (other engines)
handlebars/handlebars_test.go, mustache/mustache_test.go
Removed github.com/gofiber/fiber/v2 from tests, introduced customMap for map inputs, updated Render call argument types; mustache tests include improved trimming normalization.
Handler signature/Render arg README tweaks
ace/README.md, amber/README.md, mustache/README.md, html/README.md
README examples updated to use non-pointer fiber.Ctx and include layout argument in some Render calls.
Misc tests & refactors
handlebars/handlebars_test.go, mustache/mustache_test.go, jet/jet.go
Replaced direct fiber.Map usage with local customMap types in tests; jet engine now fills jet.VarMap from acquired context.

Sequence Diagram(s)

sequenceDiagram
    participant App as App
    participant Engine as Template Engine
    participant Core as core.AcquireViewContext
    participant Reflect as reflect (internal)

    rect rgb(235,245,235)
      Note over App,Engine: New render flow centralizes binding normalization
      App->>Engine: Engine.Render(tpl, binding)
      Engine->>Core: AcquireViewContext(binding)
    end

    alt binding == nil
      Core-->>Engine: {}
    else binding is map[string]interface{}
      Core-->>Engine: same map
    else pointer or map-like
      Core->>Reflect: unwrap & iterate keys
      Reflect-->>Core: validated map[string]interface{}
      Core-->>Engine: populated map
    else non-map
      Core-->>Engine: {}
    end

    Engine->>Engine: populate engine context & render
    Engine-->>App: rendered output
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review focus:
    • template.go — reflection, pointer unwrapping, key-type validation, nil-handling.
    • django/django.go — sanitizePongoContext correctness and boundary cases.
    • jet/jet.go, handlebars/handlebars.go, mustache/mustache.go — proper use of acquired context and any engine-specific assumptions.
    • Tests updated to customMap — ensure type compatibility with AcquireViewContext.

Poem

🐰
I hopped through maps both thin and wide,
Unwrapped pointers, left no key to hide.
From v2 to v3 I paved the way,
AcquireViewContext saves the day.
Carrot-coded, tidy and spry.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'update for fiber v3' accurately reflects the main objective of updating documentation and code examples across the repository to support Fiber v3.

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.

@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 performs a significant update to the Fiber template engine repository, primarily to align it with the new Fiber v3 release and the latest Go language version (1.25). The changes encompass updating module paths, Go version requirements, and a crucial refactoring of the data binding mechanism to enhance flexibility and reduce tight coupling with specific Fiber data structures. These updates ensure that the template engines are fully compatible and optimized for the Fiber v3 ecosystem.

Highlights

  • Fiber v3 Migration: All documentation and examples have been updated to reference and instruct users to install and use Fiber v3. This includes changes in README.md files and code snippets across various template engines.
  • Go Version Update: The minimum required Go version has been updated from 1.17 or 1.20 to 1.25 across the main module and all individual template engine modules.
  • Module Versioning Upgrade: Each template engine module (e.g., ace, amber, django) has been upgraded from v2 to v3 in their go.mod files and example import paths, reflecting a new major version for these modules.
  • Decoupling from fiber.Map: A new utility function, AcquireViewContext, has been introduced in the core template.go to standardize how template engines handle data bindings. This refactoring removes direct dependencies on fiber.Map within individual engine implementations, allowing for more flexible map types and improving modularity.
Ignored Files
  • Ignored by pattern: .github/workflows/** (13)
    • .github/workflows/benchmark.yml
    • .github/workflows/golangci-lint.yml
    • .github/workflows/gosec.yml
    • .github/workflows/govulncheck.yml
    • .github/workflows/test-ace.yml
    • .github/workflows/test-amber.yml
    • .github/workflows/test-django.yml
    • .github/workflows/test-handlebars.yml
    • .github/workflows/test-html.yml
    • .github/workflows/test-jet.yml
    • .github/workflows/test-mustache.yml
    • .github/workflows/test-pug.yml
    • .github/workflows/test-slim.yml
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.

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 updates the repository to use Fiber v3, which also involves a major version bump for the template library itself and its sub-packages. The changes include updating Go module paths, dependencies, and documentation. A significant and positive change is the refactoring to decouple template engines from fiber.Map by introducing a generic AcquireViewContext helper. I've found a few issues: the Go version is set to an unreleased version (1.25), there's an inconsistency in AcquireViewContext that could lead to side effects, and some minor formatting issues in the documentation. Overall, the changes are good, and with these fixes, the library will be in a much better state.

@ReneWerner87 ReneWerner87 changed the title docs: reference Fiber v3 in examples update for fiber v3 Oct 17, 2025
@ReneWerner87 ReneWerner87 removed the 📒 Documentation Improvements or additions to documentation label Oct 17, 2025
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: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
django/django.go (1)

251-253: Compile fix: construct pongo2.Context, not map[string]interface{}.

bind is pongo2.Context (a defined type). Assigning a plain map is a type mismatch.

- if bind == nil {
-     bind = make(map[string]interface{}, 1)
- }
+ if bind == nil {
+     bind = make(pongo2.Context, 1)
+ }
🧹 Nitpick comments (7)
README.md (2)

52-61: Replace hard tabs in code blocks.

markdownlint flags MD010; use spaces for alignment to keep linters green.

Also applies to: 142-143, 166-168, 191-193, 217-219


38-43: Add shell language label for syntax highlighting and confirm Go version requirement.

Go 1.25 requirement is accurate per go.mod. Apply the suggested formatting change:

-```
+```sh
 go get -u github.com/gofiber/fiber/v3
 go get -u github.com/gofiber/template/any_template_engine/vX

</blockquote></details>
<details>
<summary>django/README.md (1)</summary><blockquote>

`52-53`: **Remove tabs in import blocks.**

MD010 warnings; switch to spaces for alignment.



Also applies to: 108-110

</blockquote></details>
<details>
<summary>mustache/mustache.go (1)</summary><blockquote>

`174-176`: **Nice simplification with AcquireViewContext.**

Binding is normalized once, avoiding type switches. Consider preallocating capacity if desired: make(map[string]interface{}, len(bind)+1) when copying/augmenting elsewhere, but current code is fine.

</blockquote></details>
<details>
<summary>template.go (2)</summary><blockquote>

`136-139`: **Avoid mutating caller maps; copy when input is map[string]interface{}.**

Returning the original map means downstream engines may add layout keys into the caller-provided map. Prefer copy-on-write to prevent side effects. Low cost vs. surprise bugs.


```diff
- if binds, ok := binding.(map[string]interface{}); ok {
-     return binds
- }
+ if binds, ok := binding.(map[string]interface{}); ok {
+     out := make(map[string]interface{}, len(binds))
+     for k, v := range binds {
+         out[k] = v
+     }
+     return out
+ }

132-167: Add tests for edge cases.

Please add unit tests covering: nil; empty map; pointer-to-map (nil and non-nil); user-defined map type with string keys; non-string key maps; pointer-to-pointer (ensure safe unwrap or fallback).

I can draft table-driven tests for AcquireViewContext if helpful.

django/django.go (1)

241-246: Don’t hold the engine lock across template execution.

Locking around tmpl.Execute serializes all renders. Narrow the lock to only map lookups (e.Templates) and shared state reads. Execute outside the lock.

- // Lock while executing layout
- e.Mutex.Lock()
- defer e.Mutex.Unlock()
-
- bind := getPongoBinding(binding)
- parsed, err := tmpl.Execute(bind)
+ bind := getPongoBinding(binding)
+ parsed, err := tmpl.Execute(bind) // execute without engine lock
  if err != nil {
      return err
  }
  ...
- lay := e.Templates[layout[0]]
+ e.Mutex.RLock()
+ lay := e.Templates[layout[0]]
+ e.Mutex.RUnlock()

Also applies to: 264-269

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9105dc5 and 83027db.

⛔ Files ignored due to path filters (28)
  • .github/workflows/benchmark.yml is excluded by !**/*.yml
  • .github/workflows/golangci-lint.yml is excluded by !**/*.yml
  • .github/workflows/gosec.yml is excluded by !**/*.yml
  • .github/workflows/govulncheck.yml is excluded by !**/*.yml
  • .github/workflows/test-ace.yml is excluded by !**/*.yml
  • .github/workflows/test-amber.yml is excluded by !**/*.yml
  • .github/workflows/test-django.yml is excluded by !**/*.yml
  • .github/workflows/test-handlebars.yml is excluded by !**/*.yml
  • .github/workflows/test-html.yml is excluded by !**/*.yml
  • .github/workflows/test-jet.yml is excluded by !**/*.yml
  • .github/workflows/test-mustache.yml is excluded by !**/*.yml
  • .github/workflows/test-pug.yml is excluded by !**/*.yml
  • .github/workflows/test-slim.yml is excluded by !**/*.yml
  • ace/go.mod is excluded by !**/*.mod
  • ace/go.sum is excluded by !**/*.sum, !**/*.sum
  • amber/go.mod is excluded by !**/*.mod
  • django/go.mod is excluded by !**/*.mod
  • django/go.sum is excluded by !**/*.sum, !**/*.sum
  • go.mod is excluded by !**/*.mod
  • handlebars/go.mod is excluded by !**/*.mod
  • handlebars/go.sum is excluded by !**/*.sum, !**/*.sum
  • html/go.mod is excluded by !**/*.mod
  • jet/go.mod is excluded by !**/*.mod
  • jet/go.sum is excluded by !**/*.sum, !**/*.sum
  • mustache/go.mod is excluded by !**/*.mod
  • mustache/go.sum is excluded by !**/*.sum, !**/*.sum
  • pug/go.mod is excluded by !**/*.mod
  • slim/go.mod is excluded by !**/*.mod
📒 Files selected for processing (23)
  • README.md (7 hunks)
  • ace/README.md (1 hunks)
  • ace/ace.go (1 hunks)
  • amber/README.md (1 hunks)
  • amber/amber.go (1 hunks)
  • django/README.md (2 hunks)
  • django/django.go (2 hunks)
  • django/django_test.go (2 hunks)
  • handlebars/README.md (1 hunks)
  • handlebars/handlebars.go (2 hunks)
  • handlebars/handlebars_test.go (6 hunks)
  • html/README.md (3 hunks)
  • html/html.go (1 hunks)
  • jet/README.md (1 hunks)
  • jet/jet.go (2 hunks)
  • mustache/README.md (1 hunks)
  • mustache/mustache.go (2 hunks)
  • mustache/mustache_test.go (6 hunks)
  • pug/README.md (1 hunks)
  • pug/pug.go (1 hunks)
  • slim/README.md (1 hunks)
  • slim/slim.go (1 hunks)
  • template.go (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
mustache/mustache.go (1)
template.go (1)
  • AcquireViewContext (136-167)
handlebars/handlebars.go (1)
template.go (1)
  • AcquireViewContext (136-167)
jet/jet.go (1)
template.go (1)
  • AcquireViewContext (136-167)
🪛 markdownlint-cli2 (0.18.1)
mustache/README.md

52-52: Hard tabs
Column: 1

(MD010, no-hard-tabs)


53-53: Hard tabs
Column: 1

(MD010, no-hard-tabs)

pug/README.md

47-47: Hard tabs
Column: 1

(MD010, no-hard-tabs)


48-48: Hard tabs
Column: 1

(MD010, no-hard-tabs)

amber/README.md

46-46: Hard tabs
Column: 1

(MD010, no-hard-tabs)


47-47: Hard tabs
Column: 1

(MD010, no-hard-tabs)

ace/README.md

46-46: Hard tabs
Column: 1

(MD010, no-hard-tabs)


47-47: Hard tabs
Column: 1

(MD010, no-hard-tabs)

handlebars/README.md

52-52: Hard tabs
Column: 1

(MD010, no-hard-tabs)


53-53: Hard tabs
Column: 1

(MD010, no-hard-tabs)

django/README.md

52-52: Hard tabs
Column: 1

(MD010, no-hard-tabs)


53-53: Hard tabs
Column: 1

(MD010, no-hard-tabs)

README.md

40-40: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


54-54: Hard tabs
Column: 1

(MD010, no-hard-tabs)


55-55: Hard tabs
Column: 1

(MD010, no-hard-tabs)


56-56: Hard tabs
Column: 1

(MD010, no-hard-tabs)


57-57: Hard tabs
Column: 1

(MD010, no-hard-tabs)


59-59: Hard tabs
Column: 1

(MD010, no-hard-tabs)


60-60: Hard tabs
Column: 1

(MD010, no-hard-tabs)


142-142: Hard tabs
Column: 1

(MD010, no-hard-tabs)


167-167: Hard tabs
Column: 1

(MD010, no-hard-tabs)


192-192: Hard tabs
Column: 1

(MD010, no-hard-tabs)


217-217: Hard tabs
Column: 1

(MD010, no-hard-tabs)


218-218: Hard tabs
Column: 1

(MD010, no-hard-tabs)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Compare
🔇 Additional comments (16)
pug/pug.go (1)

15-15: LGTM! Import path updated to v2.

The core template import has been correctly updated to use the v2 module path, maintaining compatibility with the broader template package version upgrade.

html/html.go (1)

13-13: LGTM! Import path updated to v2.

The core template import has been correctly updated to use the v2 module path.

slim/slim.go (1)

13-13: LGTM! Import path updated to v2.

The core template import has been correctly updated to use the v2 module path.

handlebars/handlebars_test.go (2)

14-14: LGTM! Decoupling tests from Fiber types.

Introducing customMap as a local type alias removes the dependency on fiber.Map in tests, allowing the template engine to be tested independently. This is a good practice for unit testing.


30-32: LGTM! Consistent test updates.

All test cases have been consistently updated to use customMap instead of fiber.Map, maintaining test coverage while decoupling from Fiber framework types.

Also applies to: 41-43, 57-59, 73-75, 90-92

handlebars/handlebars.go (2)

13-13: LGTM! Import path updated to v2.

The core template import has been correctly updated to use the v2 module path.


158-159: LGTM! Centralized binding normalization.

Using core.AcquireViewContext(binding) replaces manual type-switching logic with a centralized helper that normalizes various binding inputs (maps, pointers, nil values). This reduces code duplication and ensures consistent binding handling across template engines.

mustache/mustache_test.go (2)

14-14: LGTM! Decoupling tests from Fiber types.

Introducing customMap removes the dependency on fiber.Map, allowing independent testing of the template engine.


30-32: LGTM! Consistent test updates.

All test cases have been consistently updated to use customMap, maintaining test coverage while decoupling from Fiber framework types.

Also applies to: 41-43, 57-59, 73-75, 89-91

mustache/README.md (1)

52-53: The version concern is incorrect; ignore the version-related verification request.

The README example correctly references github.com/gofiber/template/mustache/v3 because the mustache module is versioned as v3 (per mustache/go.mod). The implementation's use of github.com/gofiber/template/v2 is also correct—it references the core template module, which is versioned as v2 at the monorepo root. These are two different modules in the same repository with intentionally different versions.

The formatting issue is valid: the import section uses hard tabs (^I in cat -A output) and should use spaces for consistency.

Likely an incorrect or invalid review comment.

django/django_test.go (1)

120-123: Good replacement for fiber.Map in tests.

Using a local custom map type validates the new binding normalization path without pulling Fiber as a test dep. LGTM.

django/README.md (1)

52-54: Verified: django/v4 module path is correctly published and referenced.

The django/go.mod file declares module github.com/gofiber/template/django/v4, and the import in django/README.md lines 52-54 correctly references "github.com/gofiber/template/django/v4". The module path is published and properly configured.

README.md (1)

13-15: Remove suggestion to update badge target to v3—template/v3 does not exist.

The badge correctly targets template/v2. The gofiber/template package documentation shows instructions like "go get -u github.com/gofiber/template/any_template_engine/vX", and Fiber v3 documentation explicitly uses template/html/v2. Only template subpackages (such as django/v3) have v3 variants; a v3 root package does not exist on pkg.go.dev. The current badge pointing to template/v2 aligns with official Fiber documentation and is the intended version.

jet/jet.go (1)

14-14: No action required—core import version is intentional and correct.

The import of core "github.com/gofiber/template/v2" in jet/jet.go (v3 engine) is by design. The jet/go.mod explicitly requires github.com/gofiber/template/v2 v2.0.0 with a replace directive pointing to the root module. All engines (v3 and v4) follow this same pattern: they wrap core v2 with engine-specific major versions. This is not a mixed-major-version surprise but a well-structured multi-module architecture.

django/django.go (2)

162-188: Binding normalization + key sanitization look good.

The reflective map handling and sanitizePongoContext correctly accept string-key maps (incl. custom types) and filter invalid identifiers.

Consider adding tests for: pongo2.Context passthrough; map[string]interface{}; custom map type; non-map inputs; invalid keys; nil map.

Also applies to: 190-203


14-15: Version mismatch concern is invalid; no changes required.

The import of github.com/gofiber/template/v2 is correct and intentional. This monorepo structure separates the core template library (v2) from specific template engine bindings (django/v4, html/v3, etc.). The django package module is v4 (the binding version), while it correctly depends on the core template/v2 library—confirmed by the explicit require and replace directives in django/go.mod. The code and updated documentation are aligned.

Likely an incorrect or invalid review comment.

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 (10)
handlebars/README.md (1)

52-53: ** Fix indentation: replace hard tabs with spaces.**

This Markdown formatting issue has already been flagged in previous reviews. Replace hard tabs with spaces throughout the code block.

 import (
-	"log"
-	
-	"github.com/gofiber/fiber/v3"
-	"github.com/gofiber/template/handlebars/v3"
+    "log"
+    
+    "github.com/gofiber/fiber/v3"
+    "github.com/gofiber/template/handlebars/v3"
 )

-	app.Get("/", func(c fiber.Ctx) error {
-		// Render index
-		return c.Render("index", fiber.Map{
-			"Title": "Hello, World!",
-		})
-	})
-
-	app.Get("/layout", func(c fiber.Ctx) error {
+    app.Get("/", func(c fiber.Ctx) error {
+        // Render index
+        return c.Render("index", fiber.Map{
+            "Title": "Hello, World!",
+        })
+    })
+
+    app.Get("/layout", func(c fiber.Ctx) error {

Also applies to: 69-74

mustache/README.md (1)

52-53: ** Fix indentation: replace hard tabs with spaces.**

Same Markdown formatting issue as other engine READMEs. Replace hard tabs with spaces.

 import (
-	"log"
-	
-	"github.com/gofiber/fiber/v3"
-	"github.com/gofiber/template/mustache/v3"
+    "log"
+    
+    "github.com/gofiber/fiber/v3"
+    "github.com/gofiber/template/mustache/v3"
 )

-	app.Get("/", func(c fiber.Ctx) error {
-		// Render index
-		return c.Render("index", fiber.Map{
-			"Title": "Hello, World!",
-		})
-	})
-
-	app.Get("/layout", func(c fiber.Ctx) error {
+    app.Get("/", func(c fiber.Ctx) error {
+        // Render index
+        return c.Render("index", fiber.Map{
+            "Title": "Hello, World!",
+        })
+    })
+
+    app.Get("/layout", func(c fiber.Ctx) error {

Also applies to: 70-82

ace/README.md (2)

46-47: ** Fix indentation: replace hard tabs with spaces.**

Replace hard tabs with spaces in import block and route handlers.

 import (
-	"log"
-	
-	"github.com/gofiber/fiber/v3"
-	"github.com/gofiber/template/ace/v2"
+    "log"
+    
+    "github.com/gofiber/fiber/v3"
+    "github.com/gofiber/template/ace/v2"
 )

-	app.Get("/", func(c fiber.Ctx) error {
-		// Render index
-		return c.Render("index", fiber.Map{
-			"Title": "Hello, World!",
-		})
-	})
-
-	app.Get("/layout", func(c fiber.Ctx) error {
+    app.Get("/", func(c fiber.Ctx) error {
+        // Render index
+        return c.Render("index", fiber.Map{
+            "Title": "Hello, World!",
+        })
+    })
+
+    app.Get("/layout", func(c fiber.Ctx) error {

Also applies to: 63-75


46-47: Version mismatch: ace/v3 does not exist—use ace/v2.

A previous review verified that there is no official github.com/gofiber/template/ace/v3 package; the Ace engine remains on v2. Update the import to match the actual module path.

 import (
-	"github.com/gofiber/fiber/v3"
-	"github.com/gofiber/template/ace/v3"
+	"github.com/gofiber/fiber/v3"
+	"github.com/gofiber/template/ace/v2"
amber/README.md (1)

46-47: ** Fix indentation: replace hard tabs with spaces.**

Markdown formatting: replace hard tabs with spaces.

 import (
-	"log"
-	
-	"github.com/gofiber/fiber/v3"
-	"github.com/gofiber/template/amber/v3"
+    "log"
+    
+    "github.com/gofiber/fiber/v3"
+    "github.com/gofiber/template/amber/v3"
 )

-	app.Get("/", func(c fiber.Ctx) error {
-		// Render index
-		return c.Render("index", fiber.Map{
-			"Title": "Hello, World!",
-		})
-	})
-
-	app.Get("/layout", func(c fiber.Ctx) error {
+    app.Get("/", func(c fiber.Ctx) error {
+        // Render index
+        return c.Render("index", fiber.Map{
+            "Title": "Hello, World!",
+        })
+    })
+
+    app.Get("/layout", func(c fiber.Ctx) error {

Also applies to: 63-75

pug/README.md (1)

47-48: ** Fix indentation: replace hard tabs with spaces.**

Markdown formatting issue: replace hard tabs with spaces in import and route handler blocks.

 import (
-	"log"
-
-	"github.com/gofiber/fiber/v3"
-	"github.com/gofiber/template/pug/v3"
+    "log"
+
+    "github.com/gofiber/fiber/v3"
+    "github.com/gofiber/template/pug/v3"
 )

-	app.Get("/", func(c fiber.Ctx) error {
-		// Render index
-		return c.Render("index", fiber.Map{
-			"Title": "Hello, World!",
-		})
-	})
-
-	app.Get("/layout", func(c fiber.Ctx) error {
+    app.Get("/", func(c fiber.Ctx) error {
+        // Render index
+        return c.Render("index", fiber.Map{
+            "Title": "Hello, World!",
+        })
+    })
+
+    app.Get("/layout", func(c fiber.Ctx) error {

Also applies to: 66-78

slim/README.md (1)

47-48: ** Fix indentation: replace hard tabs with spaces.**

Markdown formatting issue: replace hard tabs with spaces throughout the code block.

 import (
-	"log"
-
-	"github.com/gofiber/fiber/v3"
-	"github.com/gofiber/template/slim/v3"
+    "log"
+
+    "github.com/gofiber/fiber/v3"
+    "github.com/gofiber/template/slim/v3"
 )

-	app.Get("/", func(c fiber.Ctx) error {
-		// Render index
-		return c.Render("index", fiber.Map{
-			"Title": "Hello, World!",
-		})
-	})
-
-	app.Get("/layout", func(c fiber.Ctx) error {
+    app.Get("/", func(c fiber.Ctx) error {
+        // Render index
+        return c.Render("index", fiber.Map{
+            "Title": "Hello, World!",
+        })
+    })
+
+    app.Get("/layout", func(c fiber.Ctx) error {

Also applies to: 66-78

html/README.md (1)

63-64: ** Fix indentation: replace hard tabs with spaces.**

Multiple code blocks use hard tabs; replace with spaces for Markdown compliance.

 import (
-	"log"
-
-	"github.com/gofiber/fiber/v3"
-	"github.com/gofiber/template/html/v3"
+    "log"
+
+    "github.com/gofiber/fiber/v3"
+    "github.com/gofiber/template/html/v3"
 )

-	app.Get("/", func(c fiber.Ctx) error {
-		// Render index
-		return c.Render("index", fiber.Map{
-			"Title": "Hello, World!",
-		})
-	})
-
-	app.Get("/layout", func(c fiber.Ctx) error {
-		// Render index within layouts/main
-		return c.Render("index", fiber.Map{
-			"Title": "Hello, World!",
-		}, "layouts/main")
-	})
-
-	app.Get("/layouts-nested", func(c fiber.Ctx) error {
+    app.Get("/", func(c fiber.Ctx) error {
+        // Render index
+        return c.Render("index", fiber.Map{
+            "Title": "Hello, World!",
+        })
+    })
+
+    app.Get("/layout", func(c fiber.Ctx) error {
+        // Render index within layouts/main
+        return c.Render("index", fiber.Map{
+            "Title": "Hello, World!",
+        }, "layouts/main")
+    })
+
+    app.Get("/layouts-nested", func(c fiber.Ctx) error {

Apply similar formatting fixes to other code examples (lines 116–117, 166–167, 185–190).

Also applies to: 80-85, 87-92, 116-117, 166-167, 185-190

README.md (2)

52-52: ** Fix indentation: replace hard tabs with spaces.**

Multiple code examples use hard tabs instead of spaces. Replace tabs with spaces for Markdown compliance (MD010).

Also applies to: 141-141, 166-166, 191-191, 217-217


38-38: Go version requirement 1.25 is unreleased—use 1.22.

Go 1.25 has not been released. A previous review identified this and noted that reflect.MapRange (required by the code) was added in Go 1.22. Update the requirement to reflect the actual minimum.

-> Go version `1.22` or higher is required.
🧹 Nitpick comments (1)
README.md (1)

13-13: Consider updating documentation link to v3.

The godoc badge links to /v2?tab=doc, but the PR upgrades to v3. Verify whether the link should be updated to /v3?tab=doc for consistency.

-  <a href="https://pkg.go.dev/github.com/gofiber/template/v2?tab=doc">
+  <a href="https://pkg.go.dev/github.com/gofiber/template/v3?tab=doc">
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 83027db and 0c90d1d.

📒 Files selected for processing (10)
  • README.md (8 hunks)
  • ace/README.md (2 hunks)
  • amber/README.md (2 hunks)
  • django/README.md (4 hunks)
  • handlebars/README.md (2 hunks)
  • html/README.md (6 hunks)
  • jet/README.md (2 hunks)
  • mustache/README.md (2 hunks)
  • pug/README.md (2 hunks)
  • slim/README.md (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • jet/README.md
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
html/README.md

63-63: Hard tabs
Column: 1

(MD010, no-hard-tabs)


64-64: Hard tabs
Column: 1

(MD010, no-hard-tabs)


80-80: Hard tabs
Column: 1

(MD010, no-hard-tabs)


81-81: Hard tabs
Column: 1

(MD010, no-hard-tabs)


82-82: Hard tabs
Column: 1

(MD010, no-hard-tabs)


83-83: Hard tabs
Column: 1

(MD010, no-hard-tabs)


84-84: Hard tabs
Column: 1

(MD010, no-hard-tabs)


85-85: Hard tabs
Column: 1

(MD010, no-hard-tabs)


87-87: Hard tabs
Column: 1

(MD010, no-hard-tabs)


88-88: Hard tabs
Column: 1

(MD010, no-hard-tabs)


89-89: Hard tabs
Column: 1

(MD010, no-hard-tabs)


90-90: Hard tabs
Column: 1

(MD010, no-hard-tabs)


91-91: Hard tabs
Column: 1

(MD010, no-hard-tabs)


92-92: Hard tabs
Column: 1

(MD010, no-hard-tabs)


94-94: Hard tabs
Column: 1

(MD010, no-hard-tabs)

README.md

52-52: Hard tabs
Column: 1

(MD010, no-hard-tabs)


58-58: Hard tabs
Column: 1

(MD010, no-hard-tabs)


59-59: Hard tabs
Column: 1

(MD010, no-hard-tabs)


60-60: Hard tabs
Column: 1

(MD010, no-hard-tabs)

ace/README.md

64-64: Hard tabs
Column: 1

(MD010, no-hard-tabs)


65-65: Hard tabs
Column: 1

(MD010, no-hard-tabs)


66-66: Hard tabs
Column: 1

(MD010, no-hard-tabs)


67-67: Hard tabs
Column: 1

(MD010, no-hard-tabs)


69-69: Hard tabs
Column: 1

(MD010, no-hard-tabs)


70-70: Hard tabs
Column: 1

(MD010, no-hard-tabs)

handlebars/README.md

52-52: Hard tabs
Column: 1

(MD010, no-hard-tabs)


53-53: Hard tabs
Column: 1

(MD010, no-hard-tabs)


69-69: Hard tabs
Column: 1

(MD010, no-hard-tabs)


70-70: Hard tabs
Column: 1

(MD010, no-hard-tabs)


71-71: Hard tabs
Column: 1

(MD010, no-hard-tabs)


72-72: Hard tabs
Column: 1

(MD010, no-hard-tabs)


73-73: Hard tabs
Column: 1

(MD010, no-hard-tabs)


74-74: Hard tabs
Column: 1

(MD010, no-hard-tabs)


76-76: Hard tabs
Column: 1

(MD010, no-hard-tabs)

mustache/README.md

52-52: Hard tabs
Column: 1

(MD010, no-hard-tabs)


53-53: Hard tabs
Column: 1

(MD010, no-hard-tabs)


70-70: Hard tabs
Column: 1

(MD010, no-hard-tabs)


71-71: Hard tabs
Column: 1

(MD010, no-hard-tabs)


72-72: Hard tabs
Column: 1

(MD010, no-hard-tabs)


73-73: Hard tabs
Column: 1

(MD010, no-hard-tabs)


74-74: Hard tabs
Column: 1

(MD010, no-hard-tabs)


75-75: Hard tabs
Column: 1

(MD010, no-hard-tabs)


77-77: Hard tabs
Column: 1

(MD010, no-hard-tabs)

pug/README.md

66-66: Hard tabs
Column: 1

(MD010, no-hard-tabs)


67-67: Hard tabs
Column: 1

(MD010, no-hard-tabs)


69-69: Hard tabs
Column: 1

(MD010, no-hard-tabs)


70-70: Hard tabs
Column: 1

(MD010, no-hard-tabs)


71-71: Hard tabs
Column: 1

(MD010, no-hard-tabs)


72-72: Hard tabs
Column: 1

(MD010, no-hard-tabs)


73-73: Hard tabs
Column: 1

(MD010, no-hard-tabs)

slim/README.md

47-47: Hard tabs
Column: 1

(MD010, no-hard-tabs)


48-48: Hard tabs
Column: 1

(MD010, no-hard-tabs)


66-66: Hard tabs
Column: 1

(MD010, no-hard-tabs)


67-67: Hard tabs
Column: 1

(MD010, no-hard-tabs)


68-68: Hard tabs
Column: 1

(MD010, no-hard-tabs)


69-69: Hard tabs
Column: 1

(MD010, no-hard-tabs)


70-70: Hard tabs
Column: 1

(MD010, no-hard-tabs)


71-71: Hard tabs
Column: 1

(MD010, no-hard-tabs)


73-73: Hard tabs
Column: 1

(MD010, no-hard-tabs)

🔇 Additional comments (2)
django/README.md (2)

46-86: Example code correctly updated to Fiber v3.

The imports and handler signatures are properly updated and consistent with Fiber v3 conventions. Code is syntactically correct and complete.


100-134: Embedded filesystem example correctly updated to Fiber v3.

The embedded filesystem example maintains proper structure with correct v3 imports and handler signatures. The //go:embed directive and NewPathForwardingFileSystem usage are appropriate.

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 (10)
pug/README.md (1)

12-18: Approve v3 migration changes; address hard tab formatting.

The Installation section and v3 imports are correct and align with PR objectives. The handler signature changes from *fiber.Ctx to fiber.Ctx are consistent with Fiber v3 API. However, the code block contains hard tabs (lines 55–56 and 74–82), which violates Markdown linting standards (MD010).

Apply this diff to replace hard tabs with spaces:

 import (
-	"log"
-
-	"github.com/gofiber/fiber/v3"
-	"github.com/gofiber/template/pug/v3"
+  "log"
+
+  "github.com/gofiber/fiber/v3"
+  "github.com/gofiber/template/pug/v3"
 
-	// "net/http" // embedded system
+  // "net/http" // embedded system
 )

And similarly for the route handlers (lines 74–82):

-	app.Get("/", func(c fiber.Ctx) error {
-		// Render index
-		return c.Render("index", fiber.Map{
-			"Title": "Hello, World!",
-		})
-	})
-
-	app.Get("/layout", func(c fiber.Ctx) error {
+  app.Get("/", func(c fiber.Ctx) error {
+    // Render index
+    return c.Render("index", fiber.Map{
+      "Title": "Hello, World!",
+    })
+  })
+
+  app.Get("/layout", func(c fiber.Ctx) error {

Also applies to: 55-56, 74-74, 81-81

jet/README.md (1)

17-17: Address version inconsistency between go get and import statements.

Line 17 specifies go get github.com/gofiber/template/jet/v4, but lines 60–61 import jet/v3. This inconsistency will confuse users and likely cause installation issues. Verify the correct Jet version for this PR and ensure both the go get command and import paths match.

Additionally, replace hard tabs with spaces in the code blocks (lines 60–61 and 77–82).

Also applies to: 60-61

mustache/README.md (1)

17-17: Address version inconsistency between go get and import statements.

Line 17 specifies go get github.com/gofiber/template/mustache/v4, but lines 60–61 import mustache/v3. This mismatch will cause installation failures. Verify the correct Mustache package version for this PR and align both the installation command and import paths.

Additionally, replace hard tabs with spaces in the code blocks (lines 60–61 and 78–82).

Also applies to: 60-61

README.md (1)

38-43: Approve comprehensive v3 migration; address indentation inconsistencies.

The main README documentation comprehensively updates all template engine examples and installation instructions for Fiber v3, which aligns well with the PR objectives. The v3 imports and handler signature changes are correct.

However, indentation is inconsistent across code examples: some lines use hard tabs while others use leading spaces. Standardize all code blocks to use spaces (4 spaces per indent) for Markdown compliance. Specifically, lines 52, 141, 166, 191 should match the style of surrounding code.

Example fix for lines 52:

 import (
 	"log"
 
-        "github.com/gofiber/fiber/v3"
+	"github.com/gofiber/fiber/v3"
 
 	// To use a specific template engine, import as shown below:
-	// "github.com/gofiber/template/pug/v3"
-	// "github.com/gofiber/template/mustache/v3"
+  // "github.com/gofiber/template/pug/v3"
+  // "github.com/gofiber/template/mustache/v3"
 	// etc..

Also applies to: 52-52, 96-96, 103-103, 141-142, 166-167, 191-192, 217-218

slim/README.md (1)

12-18: Approve v3 migration changes; address hard tab formatting.

The Installation section and v3 imports are correct and consistent throughout. The handler signature changes from *fiber.Ctx to fiber.Ctx align with Fiber v3 API standards. However, the code block contains hard tabs (lines 55–56 and 74–82), which violates Markdown linting standards (MD010).

Apply this diff to replace hard tabs with spaces:

 import (
-	"log"
-
-	"github.com/gofiber/fiber/v3"
-	"github.com/gofiber/template/slim/v3"
+  "log"
+
+  "github.com/gofiber/fiber/v3"
+  "github.com/gofiber/template/slim/v3"
 
-	// "net/http" // embedded system
+  // "net/http" // embedded system
 )

And for the route handlers (lines 74–86):

-	app.Get("/", func(c fiber.Ctx) error {
-		// Render index
-		return c.Render("index", fiber.Map{
-			"Title": "Hello, World!",
-		})
-	})
-
-	app.Get("/layout", func(c fiber.Ctx) error {
+  app.Get("/", func(c fiber.Ctx) error {
+    // Render index
+    return c.Render("index", fiber.Map{
+      "Title": "Hello, World!",
+    })
+  })
+
+  app.Get("/layout", func(c fiber.Ctx) error {

Also applies to: 55-56, 74-74, 81-81

amber/README.md (1)

17-17: Verify template package version consistency and address hard tab formatting.

The Installation section and import updates target v3. Verify that github.com/gofiber/template/amber/v3 is the correct published version for this PR. (A similar version mismatch issue was identified in ace/README.md during review, where ace/v3 does not exist.)

Additionally, replace hard tabs with spaces in the code blocks (lines 55 and 71–83):

 import (
-	"log"
-	
-	"github.com/gofiber/fiber/v3"
-	"github.com/gofiber/template/amber/v3"
+  "log"
+  
+  "github.com/gofiber/fiber/v3"
+  "github.com/gofiber/template/amber/v3"
 )

Also applies to: 54-55, 71-71, 78-78

handlebars/README.md (1)

12-18: Approve v3 migration changes; address hard tab formatting.

The Installation section and v3 imports are correct and align with the PR v3 migration objectives. The handler signature changes from *fiber.Ctx to fiber.Ctx are consistent with Fiber v3 API. However, the code block contains hard tabs (lines 60–61 and 77–82), which violates Markdown linting standards (MD010).

Apply this diff to replace hard tabs with spaces:

 import (
-	"log"
-	
-	"github.com/gofiber/fiber/v3"
-	"github.com/gofiber/template/handlebars/v3"
+  "log"
+  
+  "github.com/gofiber/fiber/v3"
+  "github.com/gofiber/template/handlebars/v3"
 )

And for the route handlers (lines 77–89):

-	app.Get("/", func(c fiber.Ctx) error {
-		// Render index
-		return c.Render("index", fiber.Map{
-			"Title": "Hello, World!",
-		})
-	})
-
-	app.Get("/layout", func(c fiber.Ctx) error {
+  app.Get("/", func(c fiber.Ctx) error {
+    // Render index
+    return c.Render("index", fiber.Map{
+      "Title": "Hello, World!",
+    })
+  })
+
+  app.Get("/layout", func(c fiber.Ctx) error {

Also applies to: 60-61, 77-77, 84-84

django/README.md (1)

14-14: Optional: Wrap bare URL in markdown link syntax.

The bare URL on this line could optionally be wrapped for better markdown style consistency:

-Go version support: We only support the latest two versions of Go. Visit https://go.dev/doc/devel/release for more information.
+Go version support: We only support the latest two versions of Go. Visit [Go releases](https://go.dev/doc/devel/release) for more information.
html/README.md (2)

14-14: Optional: Wrap bare URL in markdown link syntax.

The bare URL could be wrapped for better markdown style consistency:

-Go version support: We only support the latest two versions of Go. Visit https://go.dev/doc/devel/release for more information.
+Go version support: We only support the latest two versions of Go. Visit [Go releases](https://go.dev/doc/devel/release) for more information.

16-16: Optional: Specify language for fenced code block.

Adding a language specifier improves markdown rendering:

-```
+```sh
 go get github.com/gofiber/template/html/v3
-```
+```
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9e9a3d7 and 05b6534.

⛔ Files ignored due to path filters (2)
  • .github/workflows/golangci-lint.yml is excluded by !**/*.yml
  • .golangci.yml is excluded by !**/*.yml
📒 Files selected for processing (10)
  • README.md (8 hunks)
  • ace/README.md (3 hunks)
  • amber/README.md (3 hunks)
  • django/README.md (5 hunks)
  • handlebars/README.md (3 hunks)
  • html/README.md (7 hunks)
  • jet/README.md (3 hunks)
  • mustache/README.md (3 hunks)
  • pug/README.md (3 hunks)
  • slim/README.md (3 hunks)
🧰 Additional context used
🧠 Learnings (14)
📓 Common learnings
Learnt from: ReneWerner87
PR: gofiber/recipes#0
File: :0-0
Timestamp: 2024-11-26T20:05:15.793Z
Learning: For future contributions to the `gofiber/recipes` repository, ensure that the tasks outlined in `.github/CONTRIBUTING.md` are incorporated, including creating a new directory without a "fiber" prefix, adding a `README.md` with Docusaurus metadata, and updating the overview by running `make generate`.
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`.
Learnt from: sixcolors
PR: gofiber/fiber#3446
File: docs/middleware/logger.md:44-44
Timestamp: 2025-05-13T00:19:16.407Z
Learning: In documentation files for the Fiber framework, code examples are often partial and don't repeat import statements that were shown in earlier examples, focusing instead on demonstrating specific usage patterns.
Learnt from: ReneWerner87
PR: gofiber/contrib#0
File: :0-0
Timestamp: 2024-11-29T15:24:06.083Z
Learning: When customizing the Fiber context to achieve version independence, using generics in methods like `Status` and `Type` allows for fluent method chaining. Implementing a generic interface for `Ctx` on the `App` prevents class switching when registering custom contexts that use fluent methods. Providing multiple `New` methods allows users who do not wish to customize the context to continue using `fiber.New` without changes.
📚 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:

  • pug/README.md
  • mustache/README.md
  • ace/README.md
  • README.md
  • slim/README.md
  • html/README.md
  • amber/README.md
  • django/README.md
  • handlebars/README.md
📚 Learning: 2025-10-16T07:19:52.418Z
Learnt from: grivera64
PR: gofiber/fiber#3807
File: adapter_test.go:118-144
Timestamp: 2025-10-16T07:19:52.418Z
Learning: In the Fiber codebase, the linter does not allow `require` assertions from within HTTP handlers (including net/http-style handlers). Use `t.Fatalf`, `t.Errorf`, or similar `testing.T` methods for error handling inside handler functions instead.

Applied to files:

  • pug/README.md
  • jet/README.md
  • mustache/README.md
  • ace/README.md
  • README.md
  • slim/README.md
  • html/README.md
  • amber/README.md
  • handlebars/README.md
📚 Learning: 2024-12-01T01:15:48.126Z
Learnt from: juls0730
PR: gofiber/recipes#2710
File: tableflip/main.go:61-62
Timestamp: 2024-12-01T01:15:48.126Z
Learning: In the GoFiber `tableflip` recipe (`tableflip/main.go`), the implementation matches the upstream reference implementation. Future code suggestions should consider maintaining this alignment to ensure consistency.

Applied to files:

  • pug/README.md
  • ace/README.md
  • README.md
  • amber/README.md
  • handlebars/README.md
📚 Learning: 2025-10-16T07:15:26.529Z
Learnt from: grivera64
PR: gofiber/fiber#3807
File: adapter_test.go:118-144
Timestamp: 2025-10-16T07:15:26.529Z
Learning: In Fiber v3, net/http handlers (http.Handler, http.HandlerFunc, or raw func(http.ResponseWriter, *http.Request)) can be passed directly to routing methods like app.Get(), app.Post(), etc. The framework automatically detects and wraps them internally via toFiberHandler/collectHandlers. The github.com/gofiber/fiber/v3/middleware/adaptor package is legacy and should not be suggested for tests or code using native net/http handler support.

Applied to files:

  • pug/README.md
  • jet/README.md
  • mustache/README.md
  • ace/README.md
  • README.md
  • slim/README.md
  • html/README.md
  • amber/README.md
  • django/README.md
  • handlebars/README.md
📚 Learning: 2024-11-23T19:50:41.765Z
Learnt from: norri
PR: gofiber/recipes#2701
File: clean-code/app/server/server.go:14-16
Timestamp: 2024-11-23T19:50:41.765Z
Learning: In the `clean-code` example at `clean-code/app/server/server.go` using the Go Fiber framework, it's acceptable to omit production-level features like context usage and graceful shutdown handling to keep the example simple.

Applied to files:

  • pug/README.md
  • jet/README.md
  • mustache/README.md
  • ace/README.md
  • README.md
  • slim/README.md
  • html/README.md
  • amber/README.md
  • django/README.md
  • handlebars/README.md
📚 Learning: 2025-02-12T11:24:31.153Z
Learnt from: ReneWerner87
PR: gofiber/storage#0
File: :0-0
Timestamp: 2025-02-12T11:24:31.153Z
Learning: The storage package in gofiber/storage repository can be used independently of the Fiber web framework.

Applied to files:

  • pug/README.md
  • jet/README.md
  • mustache/README.md
  • ace/README.md
  • README.md
  • slim/README.md
  • html/README.md
  • amber/README.md
  • handlebars/README.md
📚 Learning: 2024-11-23T19:35:36.767Z
Learnt from: norri
PR: gofiber/recipes#2701
File: clean-code/app/main.go:0-0
Timestamp: 2024-11-23T19:35:36.767Z
Learning: In the Go `clean-code` example (`clean-code/app/main.go`) in the `gofiber/recipes` repository, it's acceptable to omit graceful shutdown handling, as the example code prioritizes simplicity over production-level practices.

Applied to files:

  • jet/README.md
  • mustache/README.md
  • ace/README.md
  • README.md
  • html/README.md
  • amber/README.md
  • handlebars/README.md
📚 Learning: 2024-11-26T20:05:15.793Z
Learnt from: ReneWerner87
PR: gofiber/recipes#0
File: :0-0
Timestamp: 2024-11-26T20:05:15.793Z
Learning: For future contributions to the `gofiber/recipes` repository, ensure that the tasks outlined in `.github/CONTRIBUTING.md` are incorporated, including creating a new directory without a "fiber" prefix, adding a `README.md` with Docusaurus metadata, and updating the overview by running `make generate`.

Applied to files:

  • ace/README.md
📚 Learning: 2025-10-14T12:26:25.474Z
Learnt from: efectn
PR: gofiber/fiber#3802
File: listen.go:459-466
Timestamp: 2025-10-14T12:26:25.474Z
Learning: Go 1.21 and later versions include builtin `min` and `max` functions that work with ordered types. These do not need to be imported or defined manually. When reviewing Go code, check the `go.mod` version before flagging `min` or `max` as undefined.

Applied to files:

  • README.md
📚 Learning: 2025-09-18T00:32:59.671Z
Learnt from: sixcolors
PR: gofiber/fiber#0
File: :0-0
Timestamp: 2025-09-18T00:32:59.671Z
Learning: In Go 1.22, manual copying of loop variables (like `x := x`) is no longer necessary due to the fix for variable capture in closures. Each loop iteration now creates its own instance of the loop variable automatically.

Applied to files:

  • README.md
📚 Learning: 2025-05-13T00:19:16.407Z
Learnt from: sixcolors
PR: gofiber/fiber#3446
File: docs/middleware/logger.md:44-44
Timestamp: 2025-05-13T00:19:16.407Z
Learning: In documentation files for the Fiber framework, code examples are often partial and don't repeat import statements that were shown in earlier examples, focusing instead on demonstrating specific usage patterns.

Applied to files:

  • README.md
📚 Learning: 2025-05-07T13:07:33.899Z
Learnt from: mdelapenya
PR: gofiber/fiber#3434
File: docs/api/services.md:39-43
Timestamp: 2025-05-07T13:07:33.899Z
Learning: When documenting Go interface methods in the Fiber project, avoid showing method signatures with the interface type as the receiver (e.g., `func (d *Service) Method()`) since interfaces cannot be used as receivers in Go. Instead, show just the method signature without a receiver or use a placeholder implementation name.

Applied to files:

  • README.md
📚 Learning: 2024-09-25T16:18:34.719Z
Learnt from: sixcolors
PR: gofiber/fiber#3016
File: middleware/session/config.go:122-122
Timestamp: 2024-09-25T16:18:34.719Z
Learning: In `DefaultErrorHandler(c *fiber.Ctx, err error)`, since `c` is a pointer to an interface, we need to dereference `*c` when calling interface methods like `SendStatus`.

Applied to files:

  • html/README.md
  • django/README.md
🪛 markdownlint-cli2 (0.18.1)
pug/README.md

14-14: Bare URL used

(MD034, no-bare-urls)


16-16: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


55-55: Hard tabs
Column: 1

(MD010, no-hard-tabs)


56-56: Hard tabs
Column: 1

(MD010, no-hard-tabs)


74-74: Hard tabs
Column: 1

(MD010, no-hard-tabs)


75-75: Hard tabs
Column: 1

(MD010, no-hard-tabs)


76-76: Hard tabs
Column: 1

(MD010, no-hard-tabs)


77-77: Hard tabs
Column: 1

(MD010, no-hard-tabs)


78-78: Hard tabs
Column: 1

(MD010, no-hard-tabs)


79-79: Hard tabs
Column: 1

(MD010, no-hard-tabs)


81-81: Hard tabs
Column: 1

(MD010, no-hard-tabs)

jet/README.md

14-14: Bare URL used

(MD034, no-bare-urls)


16-16: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


60-60: Hard tabs
Column: 1

(MD010, no-hard-tabs)


61-61: Hard tabs
Column: 1

(MD010, no-hard-tabs)


77-77: Hard tabs
Column: 1

(MD010, no-hard-tabs)


78-78: Hard tabs
Column: 1

(MD010, no-hard-tabs)


79-79: Hard tabs
Column: 1

(MD010, no-hard-tabs)


80-80: Hard tabs
Column: 1

(MD010, no-hard-tabs)


81-81: Hard tabs
Column: 1

(MD010, no-hard-tabs)


82-82: Hard tabs
Column: 1

(MD010, no-hard-tabs)


84-84: Hard tabs
Column: 1

(MD010, no-hard-tabs)

mustache/README.md

14-14: Bare URL used

(MD034, no-bare-urls)


16-16: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


60-60: Hard tabs
Column: 1

(MD010, no-hard-tabs)


61-61: Hard tabs
Column: 1

(MD010, no-hard-tabs)


78-78: Hard tabs
Column: 1

(MD010, no-hard-tabs)


79-79: Hard tabs
Column: 1

(MD010, no-hard-tabs)


80-80: Hard tabs
Column: 1

(MD010, no-hard-tabs)


81-81: Hard tabs
Column: 1

(MD010, no-hard-tabs)


82-82: Hard tabs
Column: 1

(MD010, no-hard-tabs)


83-83: Hard tabs
Column: 1

(MD010, no-hard-tabs)


85-85: Hard tabs
Column: 1

(MD010, no-hard-tabs)

ace/README.md

14-14: Bare URL used

(MD034, no-bare-urls)


16-16: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


55-55: Hard tabs
Column: 1

(MD010, no-hard-tabs)


71-71: Hard tabs
Column: 1

(MD010, no-hard-tabs)


72-72: Hard tabs
Column: 1

(MD010, no-hard-tabs)


74-74: Hard tabs
Column: 1

(MD010, no-hard-tabs)


75-75: Hard tabs
Column: 1

(MD010, no-hard-tabs)


76-76: Hard tabs
Column: 1

(MD010, no-hard-tabs)


77-77: Hard tabs
Column: 1

(MD010, no-hard-tabs)


78-78: Hard tabs
Column: 1

(MD010, no-hard-tabs)

slim/README.md

14-14: Bare URL used

(MD034, no-bare-urls)


16-16: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


55-55: Hard tabs
Column: 1

(MD010, no-hard-tabs)


56-56: Hard tabs
Column: 1

(MD010, no-hard-tabs)


74-74: Hard tabs
Column: 1

(MD010, no-hard-tabs)


75-75: Hard tabs
Column: 1

(MD010, no-hard-tabs)


76-76: Hard tabs
Column: 1

(MD010, no-hard-tabs)


77-77: Hard tabs
Column: 1

(MD010, no-hard-tabs)


78-78: Hard tabs
Column: 1

(MD010, no-hard-tabs)


79-79: Hard tabs
Column: 1

(MD010, no-hard-tabs)


81-81: Hard tabs
Column: 1

(MD010, no-hard-tabs)

html/README.md

14-14: Bare URL used

(MD034, no-bare-urls)


16-16: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


71-71: Hard tabs
Column: 1

(MD010, no-hard-tabs)


72-72: Hard tabs
Column: 1

(MD010, no-hard-tabs)


88-88: Hard tabs
Column: 1

(MD010, no-hard-tabs)


89-89: Hard tabs
Column: 1

(MD010, no-hard-tabs)


90-90: Hard tabs
Column: 1

(MD010, no-hard-tabs)


91-91: Hard tabs
Column: 1

(MD010, no-hard-tabs)


92-92: Hard tabs
Column: 1

(MD010, no-hard-tabs)


93-93: Hard tabs
Column: 1

(MD010, no-hard-tabs)


95-95: Hard tabs
Column: 1

(MD010, no-hard-tabs)


96-96: Hard tabs
Column: 1

(MD010, no-hard-tabs)


97-97: Hard tabs
Column: 1

(MD010, no-hard-tabs)


98-98: Hard tabs
Column: 1

(MD010, no-hard-tabs)


99-99: Hard tabs
Column: 1

(MD010, no-hard-tabs)


100-100: Hard tabs
Column: 1

(MD010, no-hard-tabs)


102-102: Hard tabs
Column: 1

(MD010, no-hard-tabs)

amber/README.md

14-14: Bare URL used

(MD034, no-bare-urls)


16-16: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


55-55: Hard tabs
Column: 1

(MD010, no-hard-tabs)


71-71: Hard tabs
Column: 1

(MD010, no-hard-tabs)


72-72: Hard tabs
Column: 1

(MD010, no-hard-tabs)


74-74: Hard tabs
Column: 1

(MD010, no-hard-tabs)


75-75: Hard tabs
Column: 1

(MD010, no-hard-tabs)


76-76: Hard tabs
Column: 1

(MD010, no-hard-tabs)


77-77: Hard tabs
Column: 1

(MD010, no-hard-tabs)


78-78: Hard tabs
Column: 1

(MD010, no-hard-tabs)

django/README.md

14-14: Bare URL used

(MD034, no-bare-urls)


16-16: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


60-60: Hard tabs
Column: 1

(MD010, no-hard-tabs)


61-61: Hard tabs
Column: 1

(MD010, no-hard-tabs)


77-77: Hard tabs
Column: 1

(MD010, no-hard-tabs)


78-78: Hard tabs
Column: 1

(MD010, no-hard-tabs)


79-79: Hard tabs
Column: 1

(MD010, no-hard-tabs)


80-80: Hard tabs
Column: 1

(MD010, no-hard-tabs)


81-81: Hard tabs
Column: 1

(MD010, no-hard-tabs)


82-82: Hard tabs
Column: 1

(MD010, no-hard-tabs)


84-84: Hard tabs
Column: 1

(MD010, no-hard-tabs)


116-116: Hard tabs
Column: 1

(MD010, no-hard-tabs)


117-117: Hard tabs
Column: 1

(MD010, no-hard-tabs)


132-132: Hard tabs
Column: 1

(MD010, no-hard-tabs)

handlebars/README.md

14-14: Bare URL used

(MD034, no-bare-urls)


16-16: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


60-60: Hard tabs
Column: 1

(MD010, no-hard-tabs)


61-61: Hard tabs
Column: 1

(MD010, no-hard-tabs)


77-77: Hard tabs
Column: 1

(MD010, no-hard-tabs)


78-78: Hard tabs
Column: 1

(MD010, no-hard-tabs)


79-79: Hard tabs
Column: 1

(MD010, no-hard-tabs)


80-80: Hard tabs
Column: 1

(MD010, no-hard-tabs)


81-81: Hard tabs
Column: 1

(MD010, no-hard-tabs)


82-82: Hard tabs
Column: 1

(MD010, no-hard-tabs)


84-84: Hard tabs
Column: 1

(MD010, no-hard-tabs)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Tests (1.25.x, windows-latest)
  • GitHub Check: Tests (1.25.x, windows-latest)
  • GitHub Check: Tests (1.25.x, windows-latest)
  • GitHub Check: Tests (1.25.x, windows-latest)
  • GitHub Check: Tests (1.25.x, windows-latest)
  • GitHub Check: Compare
  • GitHub Check: Tests (1.25.x, windows-latest)
  • GitHub Check: Tests (1.25.x, windows-latest)
🔇 Additional comments (13)
django/README.md (5)

12-18: Installation section is well-structured and informative.

Addition of Go version support guidance and clear installation instructions for v4 is appropriate.


60-61: Import updates correctly reflect Fiber v3 and Django v4.


77-77: Handler signatures correctly updated to Fiber v3 value-receiver pattern.

The change from func(c *fiber.Ctx) to func(c fiber.Ctx) aligns with Fiber v3's updated API.

Also applies to: 84-84


116-117: Embedded filesystem example imports are consistent with v3 migration.


132-132: Embedded filesystem handler signature correctly uses Fiber v3 pattern.

html/README.md (8)

12-18: Installation section clearly documents v3 installation and Go version requirements.


71-72: Fiber v3 and HTML v3 imports correctly specified.


88-88: Handler signatures correctly use Fiber v3 value-receiver pattern.

Also applies to: 95-95


102-107: New nested layout example is a valuable addition for demonstrating v3 capabilities.

The nested layout pattern showing multiple base layouts is a helpful example for users learning the v3 rendering capabilities.


124-125: Embedded filesystem example imports correctly reflect v3 versions.


140-140: Embedded filesystem handler uses correct v3 signature.


174-175: innerHTML example imports correctly specify v3 versions.


193-193: innerHTML handler correctly uses v3 value-receiver pattern.

@gaby gaby mentioned this pull request Nov 2, 2025
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

🧹 Nitpick comments (1)
jet/jet.go (1)

192-207: Good refactoring; nil panic issue resolved.

The previous concern about nil binding causing a panic has been addressed. The function now always returns a non-nil jet.VarMap, preventing the panic when bind.Set(e.LayoutName, ...) is called on line 180.

The centralized use of core.AcquireViewContext improves maintainability by delegating binding normalization to a single helper.

Minor refinements:

1. Remove redundant nil check:
Since core.AcquireViewContext already handles nil bindings (returns an empty map), the explicit nil check is redundant:

 func jetVarMap(binding interface{}) jet.VarMap {
-	if binding == nil {
-		return make(jet.VarMap)
-	}
-
 	if bind, ok := binding.(jet.VarMap); ok {
 		return bind
 	}
 
 	data := core.AcquireViewContext(binding)
 	bind := make(jet.VarMap, len(data))
 	for key, value := range data {
 		bind.Set(key, value)
 	}
 	return bind
 }

2. Pre-allocate +1 capacity for layout:
Since line 180 may insert a layout entry (bind.Set(e.LayoutName, ...)), pre-allocating one extra slot avoids a potential map reallocation:

-	bind := make(jet.VarMap, len(data))
+	bind := make(jet.VarMap, len(data)+1)
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 05b6534 and 89b2214.

📒 Files selected for processing (2)
  • jet/jet.go (2 hunks)
  • template.go (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • template.go
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: ReneWerner87
Repo: gofiber/recipes PR: 0
File: :0-0
Timestamp: 2024-11-26T20:05:15.793Z
Learning: For future contributions to the `gofiber/recipes` repository, ensure that the tasks outlined in `.github/CONTRIBUTING.md` are incorporated, including creating a new directory without a "fiber" prefix, adding a `README.md` with Docusaurus metadata, and updating the overview by running `make generate`.
Learnt from: ReneWerner87
Repo: gofiber/fiber PR: 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`.
📚 Learning: 2025-02-12T11:24:31.153Z
Learnt from: ReneWerner87
Repo: gofiber/storage PR: 0
File: :0-0
Timestamp: 2025-02-12T11:24:31.153Z
Learning: The storage package in gofiber/storage repository can be used independently of the Fiber web framework.

Applied to files:

  • jet/jet.go
📚 Learning: 2025-10-16T07:19:52.418Z
Learnt from: grivera64
Repo: gofiber/fiber PR: 3807
File: adapter_test.go:118-144
Timestamp: 2025-10-16T07:19:52.418Z
Learning: In the Fiber codebase, the linter does not allow `require` assertions from within HTTP handlers (including net/http-style handlers). Use `t.Fatalf`, `t.Errorf`, or similar `testing.T` methods for error handling inside handler functions instead.

Applied to files:

  • jet/jet.go
📚 Learning: 2025-10-16T07:15:26.529Z
Learnt from: grivera64
Repo: gofiber/fiber PR: 3807
File: adapter_test.go:118-144
Timestamp: 2025-10-16T07:15:26.529Z
Learning: In Fiber v3, net/http handlers (http.Handler, http.HandlerFunc, or raw func(http.ResponseWriter, *http.Request)) can be passed directly to routing methods like app.Get(), app.Post(), etc. The framework automatically detects and wraps them internally via toFiberHandler/collectHandlers. The github.com/gofiber/fiber/v3/middleware/adaptor package is legacy and should not be suggested for tests or code using native net/http handler support.

Applied to files:

  • jet/jet.go
📚 Learning: 2024-11-23T19:50:41.765Z
Learnt from: norri
Repo: gofiber/recipes PR: 2701
File: clean-code/app/server/server.go:14-16
Timestamp: 2024-11-23T19:50:41.765Z
Learning: In the `clean-code` example at `clean-code/app/server/server.go` using the Go Fiber framework, it's acceptable to omit production-level features like context usage and graceful shutdown handling to keep the example simple.

Applied to files:

  • jet/jet.go
🧬 Code graph analysis (1)
jet/jet.go (1)
template.go (1)
  • AcquireViewContext (137-168)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: gosec-scan (pug)
  • GitHub Check: Compare
  • GitHub Check: Tests (1.25.x, windows-latest)
  • GitHub Check: Tests (1.25.x, windows-latest)
  • GitHub Check: Tests (1.25.x, windows-latest)
  • GitHub Check: Tests (1.25.x, windows-latest)
🔇 Additional comments (1)
jet/jet.go (1)

14-14: LGTM: Template package import is correct.

The import references the template engine package v2, which is separate from the Fiber web framework versioning. This is appropriate for the template engine.

Copy link
Member

@gaby gaby left a comment

Choose a reason for hiding this comment

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

2.6.1 is the latest

@ReneWerner87 ReneWerner87 merged commit 84de83e into master Nov 13, 2025
35 checks passed
@ReneWerner87 ReneWerner87 deleted the codex/2025-10-17-10-30-15 branch November 13, 2025 21:14
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