Skip to content

Commit

Permalink
Merge branch 'expand-bench-tests' of github.com:gofiber/template into…
Browse files Browse the repository at this point in the history
… expand-bench-tests
  • Loading branch information
gaby committed Feb 15, 2024
2 parents 06ea1af + d73cd8d commit ca3e082
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
steps:
- name: Check Labels
id: labeler
uses: fuxingloh/multi-labeler@v2
uses: fuxingloh/multi-labeler@v4
with:
github-token: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
key: ${{ runner.os }}-benchmark

- name: Save Benchmark Results
uses: benchmark-action/github-action-benchmark@v1.18.0
uses: benchmark-action/github-action-benchmark@v1.19.3
with:
tool: "go"
output-file-path: output.txt
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 @@ -37,7 +37,7 @@ jobs:
go-version: '1.20.x'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
# NOTE: Keep this in sync with the version from .golangci.yml
version: 'v1.56.1'
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter-ace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-ace.yml
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter-amber.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-amber.yml
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-core.yml
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter-django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-django.yml
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter-handlebars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-handlebars.yml
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter-html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-html.yml
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter-jet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-jet.yml
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter-mustache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-mustache.yml
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter-pug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-pug.yml
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter-slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-slim.yml
env:
Expand Down
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ linters-settings:
- ifElseChain

gofumpt:
module-path: github.com/gofiber/fiber
module-path: github.com/gofiber/template
extra-rules: true

gosec:
Expand Down Expand Up @@ -227,4 +227,4 @@ linters:
- wastedassign
- whitespace
- wrapcheck
- tenv
- tenv
2 changes: 1 addition & 1 deletion amber/amber_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func Benchmark_Amber(b *testing.B) {
expectExtended := `<!DOCTYPE html><html><head><title>Main</title></head><body><h2>Header</h2><h1>Hello, Admin!</h1><h2>Footer</h2></body></html>`
engine := New("./views", ".amber")
engine.AddFunc("isAdmin", func(user string) bool {
return user == "admin"
return user == admin
})
require.NoError(b, engine.Load())

Expand Down
4 changes: 1 addition & 3 deletions django/django.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ func (e *Engine) initialize(directory, extension string, fs http.FileSystem) {
e.Engine.LayoutName = "embed"
e.Engine.Funcmap = make(map[string]interface{})
e.autoEscape = true
if fs != nil {
e.Engine.FileSystem = fs
}
e.Engine.FileSystem = fs
}

// New creates a new Engine with a directory and extension.
Expand Down

0 comments on commit ca3e082

Please sign in to comment.