Fiber http driver for Goravel.
| goravel/fiber | goravel/framework |
|---|---|
| v1.17.x | v1.17.x |
| v1.4.x | v1.16.x |
| v1.3.x | v1.15.x |
| v1.2.x | v1.14.x |
| v1.1.x | v1.13.x |
Run the command below in your project to install the package automatically:
./artisan package:install github.com/goravel/fiber
Or check the setup file to install the package manually.
You can define the template configuration. If omitted, DefaultTemplate() is used automatically as a fallback, which loads views from resources/views and any registered package views.
You can provide a custom template configuration in two forms:
func() (fiber.Views, error)— a callback that returns a custom template engine (e.g. to configure custom delimiters or a FuncMap).fiber.Views— a pre-built template engine instance.
Custom example:
import (
"html/template"
"github.com/gofiber/fiber/v3"
goravelfiber "github.com/goravel/fiber"
)
"template": func() (fiber.Views, error) {
return goravelfiber.NewTemplate(goravelfiber.RenderOptions{
Delims: &goravelfiber.Delims{Left: "{[", Right: "]}"},
FuncMap: template.FuncMap{
"upper": strings.ToUpper,
},
})
},Run command below to run test:
go test ./...