Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/setup-go@v5
with:
# NOTE: Keep this in sync with the version from go.mod
go-version: "1.20.x"
go-version: "1.25.x"
cache: false

- name: Run Benchmarks
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: actions/setup-go@v5
with:
# NOTE: Keep this in sync with the version from go.mod
go-version: '1.20.x'
go-version: '1.25.x'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gosec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '^1.21.x'
go-version: '1.25.x'
check-latest: true
cache: false
- name: Install gosec
Expand Down
78 changes: 39 additions & 39 deletions .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
name: Govulncheck Security Scan
on:
push:
branches:
- "master"
- "main"
paths-ignore:
- "**.md"
- LICENSE
- ".github/ISSUE_TEMPLATE/*.yml"
- ".github/dependabot.yml"
pull_request:
branches:
- "*"
paths-ignore:
- "**.md"
- LICENSE
- ".github/ISSUE_TEMPLATE/*.yml"
- ".github/dependabot.yml"
jobs:
govulncheck-check:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Fetch Repository
uses: actions/checkout@v5
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
check-latest: true
cache: false
- name: Install Govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run Govulncheck
run: govulncheck ./...
name: Govulncheck Security Scan

on:
push:
branches:
- "master"
- "main"
paths-ignore:
- "**.md"
- LICENSE
- ".github/ISSUE_TEMPLATE/*.yml"
- ".github/dependabot.yml"
pull_request:
branches:
- "*"
paths-ignore:
- "**.md"
- LICENSE
- ".github/ISSUE_TEMPLATE/*.yml"
- ".github/dependabot.yml"

jobs:
govulncheck-check:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Fetch Repository
uses: actions/checkout@v5
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.25.x'
check-latest: false
cache: false
- name: Install Govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run Govulncheck
run: govulncheck ./...
7 changes: 1 addition & 6 deletions .github/workflows/test-ace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ jobs:
strategy:
matrix:
go-version:
- 1.17.x
- 1.18.x
- 1.19.x
- 1.20.x
- 1.21.x
- 1.22.x
- 1.25.x
platform: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/test-amber.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ jobs:
strategy:
matrix:
go-version:
- 1.17.x
- 1.18.x
- 1.19.x
- 1.20.x
- 1.21.x
- 1.22.x
- 1.25.x
platform: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/test-django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ jobs:
strategy:
matrix:
go-version:
- 1.18.x
- 1.19.x
- 1.20.x
- 1.21.x
- 1.22.x
- 1.25.x
platform: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/test-handlebars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ jobs:
strategy:
matrix:
go-version:
- 1.17.x
- 1.18.x
- 1.19.x
- 1.20.x
- 1.21.x
- 1.22.x
- 1.25.x
platform: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/test-html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ jobs:
strategy:
matrix:
go-version:
- 1.17.x
- 1.18.x
- 1.19.x
- 1.20.x
- 1.21.x
- 1.22.x
- 1.25.x
platform: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/test-jet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ jobs:
strategy:
matrix:
go-version:
- 1.17.x
- 1.18.x
- 1.19.x
- 1.20.x
- 1.21.x
- 1.22.x
- 1.25.x
platform: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/test-mustache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ jobs:
strategy:
matrix:
go-version:
- 1.17.x
- 1.18.x
- 1.19.x
- 1.20.x
- 1.21.x
- 1.22.x
- 1.25.x
platform: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/test-pug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ jobs:
strategy:
matrix:
go-version:
- 1.17.x
- 1.18.x
- 1.19.x
- 1.20.x
- 1.21.x
- 1.22.x
- 1.25.x
platform: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/test-slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ jobs:
strategy:
matrix:
go-version:
- 1.17.x
- 1.18.x
- 1.19.x
- 1.20.x
- 1.21.x
- 1.22.x
- 1.25.x
platform: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sidebar_position: 1
<img height="125" alt="Fiber" src="https://raw.githubusercontent.com/gofiber/template/master/.github/logo.svg#gh-light-mode-only" />
<br/>

<a href="https://pkg.go.dev/github.com/gofiber/template?tab=doc">
<a href="https://pkg.go.dev/github.com/gofiber/template/v2?tab=doc">
<img src="https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7&style=flat"/>
</a>
<a href="https://goreportcard.com/report/github.com/gofiber/template">
Expand All @@ -35,10 +35,10 @@ This package provides universal methods to use multiple template engines with th
- [slim](./slim/README.md) <a href="https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Slim%22"> <img src="https://img.shields.io/github/actions/workflow/status/gofiber/template/test-slim.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"/></a>

### Installation
> Go version `1.17` or higher is required.
> Go version `1.25` or higher is required.

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

Expand All @@ -49,15 +49,15 @@ package main
import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v3"

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

// In this example we use the html template engine
"github.com/gofiber/template/html/v2"
"github.com/gofiber/template/html/v3"
)

func main() {
Expand Down Expand Up @@ -93,14 +93,14 @@ func main() {

// To render a template, you can call the ctx.Render function
// Render(tmpl string, values interface{}, layout ...string)
app.Get("/", func(c *fiber.Ctx) error {
app.Get("/", func(c fiber.Ctx) error {
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

// Render with layout example
app.Get("/layout", func(c *fiber.Ctx) error {
app.Get("/layout", func(c fiber.Ctx) error {
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
Expand Down Expand Up @@ -138,8 +138,8 @@ package main
import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"
"github.com/gofiber/fiber/v3"
"github.com/gofiber/template/html/v3"

"github.com/markbates/pkger"
)
Expand All @@ -163,8 +163,8 @@ package main
import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"
"github.com/gofiber/fiber/v3"
"github.com/gofiber/template/html/v3"

"github.com/gobuffalo/packr/v2"
)
Expand All @@ -188,8 +188,8 @@ package main
import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"
"github.com/gofiber/fiber/v3"
"github.com/gofiber/template/html/v3"

"github.com/GeertJohan/go.rice"
)
Expand All @@ -214,8 +214,8 @@ package main
import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"
"github.com/gofiber/fiber/v3"
"github.com/gofiber/template/html/v3"
// your generated package
"github.com/<user>/<repo>/static"
)
Expand Down
8 changes: 4 additions & 4 deletions ace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ package main
import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/ace/v2"
"github.com/gofiber/fiber/v3"
"github.com/gofiber/template/ace/v3"
)

func main() {
Expand All @@ -60,14 +60,14 @@ func main() {
Views: engine,
})

app.Get("/", 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 {
app.Get("/layout", func(c fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
Expand Down
2 changes: 1 addition & 1 deletion ace/ace.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"path/filepath"
"strings"

core "github.com/gofiber/template"
core "github.com/gofiber/template/v2"
"github.com/gofiber/utils"
"github.com/yosssi/ace"
)
Expand Down
8 changes: 4 additions & 4 deletions ace/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/gofiber/template/ace/v2
module github.com/gofiber/template/ace/v3

go 1.17
go 1.25

require github.com/yosssi/ace v0.0.5

require (
github.com/gofiber/template v1.8.3
github.com/gofiber/template/v2 v2.0.0
github.com/gofiber/utils v1.1.0
github.com/stretchr/testify v1.11.1
)
Expand All @@ -16,4 +16,4 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/gofiber/template => ../.
replace github.com/gofiber/template/v2 => ../.
Loading
Loading