Skip to content

Commit 7402266

Browse files
committed
Merge branch 'v5_alpha' into v5_alpha_labstack
# Conflicts: # .github/workflows/echo.yml # Makefile # context.go # context_test.go # echo.go # echo_test.go # group.go # group_test.go # middleware/basic_auth.go # middleware/basic_auth_test.go # middleware/body_limit_test.go # middleware/decompress_test.go # middleware/extractor.go # middleware/jwt.go # middleware/jwt_external_test.go # middleware/jwt_test.go # middleware/key_auth.go # middleware/key_auth_test.go # middleware/logger.go # middleware/method_override_test.go # middleware/recover.go # middleware/recover_test.go # router.go # router_test.go # server_test.go
2 parents ed2888c + aad765a commit 7402266

34 files changed

+2288
-488
lines changed

.github/workflows/echo.yml

+24-24
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
- '_fixture/**'
2020
- '.github/**'
2121
- 'codecov.yml'
22-
workflow_dispatch: # to be able to run workflow manually
22+
workflow_dispatch:
2323

2424
jobs:
2525
test:
@@ -29,72 +29,72 @@ jobs:
2929
# Each major Go release is supported until there are two newer major releases. https://golang.org/doc/devel/release.html#policy
3030
# Echo tests with last four major releases
3131
# except v5 starts from 1.17 until there is last four major releases after that
32-
go: [1.17]
32+
go: [1.17, 1.18]
3333
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
3434
runs-on: ${{ matrix.os }}
3535
steps:
36-
- name: Set up Go ${{ matrix.go }}
37-
uses: actions/setup-go@v2
38-
with:
39-
go-version: ${{ matrix.go }}
40-
4136
- name: Checkout Code
42-
uses: actions/checkout@v2
37+
uses: actions/checkout@v3
4338
with:
4439
ref: ${{ github.ref }}
4540

41+
- name: Set up Go ${{ matrix.go }}
42+
uses: actions/setup-go@v3
43+
with:
44+
go-version: ${{ matrix.go }}
45+
4646
- name: Install Dependencies
47-
run: go get -v golang.org/x/lint/golint
47+
run: |
48+
go install golang.org/x/lint/golint@latest
49+
go install honnef.co/go/tools/cmd/staticcheck@latest
4850
4951
- name: Run Tests
5052
run: |
5153
golint -set_exit_status ./...
54+
staticcheck ./...
5255
go test -race --coverprofile=coverage.coverprofile --covermode=atomic ./...
53-
5456
- name: Upload coverage to Codecov
55-
if: success() && matrix.go == 1.17 && matrix.os == 'ubuntu-latest'
56-
uses: codecov/codecov-action@v2
57+
if: success() && matrix.go == 1.18 && matrix.os == 'ubuntu-latest'
58+
uses: codecov/codecov-action@v1
5759
with:
60+
token:
5861
fail_ci_if_error: false
59-
6062
benchmark:
6163
needs: test
6264
strategy:
6365
matrix:
6466
os: [ubuntu-latest]
65-
go: [1.17]
67+
go: [1.18]
6668
name: Benchmark comparison ${{ matrix.os }} @ Go ${{ matrix.go }}
6769
runs-on: ${{ matrix.os }}
6870
steps:
69-
- name: Set up Go ${{ matrix.go }}
70-
uses: actions/setup-go@v2
71-
with:
72-
go-version: ${{ matrix.go }}
73-
7471
- name: Checkout Code (Previous)
75-
uses: actions/checkout@v2
72+
uses: actions/checkout@v3
7673
with:
7774
ref: ${{ github.base_ref }}
7875
path: previous
7976

8077
- name: Checkout Code (New)
81-
uses: actions/checkout@v2
78+
uses: actions/checkout@v3
8279
with:
8380
path: new
8481

82+
- name: Set up Go ${{ matrix.go }}
83+
uses: actions/setup-go@v3
84+
with:
85+
go-version: ${{ matrix.go }}
86+
8587
- name: Install Dependencies
86-
run: go get -v golang.org/x/perf/cmd/benchstat
88+
run: go install golang.org/x/perf/cmd/benchstat@latest
8789

8890
- name: Run Benchmark (Previous)
8991
run: |
9092
cd previous
9193
go test -run="-" -bench=".*" -count=8 ./... > benchmark.txt
92-
9394
- name: Run Benchmark (New)
9495
run: |
9596
cd new
9697
go test -run="-" -bench=".*" -count=8 ./... > benchmark.txt
97-
9898
- name: Run Benchstat
9999
run: |
100100
benchstat previous/benchmark.txt new/benchmark.txt

CHANGELOG.md

+45
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,50 @@
11
# Changelog
22

3+
## v4.7.2 - 2022-03-16
4+
5+
**Fixes**
6+
7+
* Fix nil pointer exception when calling Start again after address binding error [#2131](https://github.com/labstack/echo/pull/2131)
8+
* Fix CSRF middleware not being able to extract token from multipart/form-data form [#2136](https://github.com/labstack/echo/pull/2136)
9+
* Fix Timeout middleware write race [#2126](https://github.com/labstack/echo/pull/2126)
10+
11+
**Enhancements**
12+
13+
* Recover middleware should not log panic for aborted handler [#2134](https://github.com/labstack/echo/pull/2134)
14+
15+
16+
## v4.7.1 - 2022-03-13
17+
18+
**Fixes**
19+
20+
* Fix `e.Static`, `.File()`, `c.Attachment()` being picky with paths starting with `./`, `../` and `/` after 4.7.0 introduced echo.Filesystem support (Go1.16+) [#2123](https://github.com/labstack/echo/pull/2123)
21+
22+
**Enhancements**
23+
24+
* Remove some unused code [#2116](https://github.com/labstack/echo/pull/2116)
25+
26+
27+
## v4.7.0 - 2022-03-01
28+
29+
**Enhancements**
30+
31+
* Add JWT, KeyAuth, CSRF multivalue extractors [#2060](https://github.com/labstack/echo/pull/2060)
32+
* Add LogErrorFunc to recover middleware [#2072](https://github.com/labstack/echo/pull/2072)
33+
* Add support for HEAD method query params binding [#2027](https://github.com/labstack/echo/pull/2027)
34+
* Improve filesystem support with echo.FileFS, echo.StaticFS, group.FileFS, group.StaticFS [#2064](https://github.com/labstack/echo/pull/2064)
35+
36+
**Fixes**
37+
38+
* Fix X-Real-IP bug, improve tests [#2007](https://github.com/labstack/echo/pull/2007)
39+
* Minor syntax fixes [#1994](https://github.com/labstack/echo/pull/1994), [#2102](https://github.com/labstack/echo/pull/2102), [#2102](https://github.com/labstack/echo/pull/2102)
40+
41+
**General**
42+
43+
* Add cache-control and connection headers [#2103](https://github.com/labstack/echo/pull/2103)
44+
* Add Retry-After header constant [#2078](https://github.com/labstack/echo/pull/2078)
45+
* Upgrade `go` directive in `go.mod` to 1.17 [#2049](https://github.com/labstack/echo/pull/2049)
46+
* Add Pagoda [#2077](https://github.com/labstack/echo/pull/2077) and Souin [#2069](https://github.com/labstack/echo/pull/2069) to 3rd-party middlewares in README
47+
348
## v4.6.3 - 2022-01-10
449

550
**Fixes**

Makefile

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ tag:
99
check: lint vet race ## Check project
1010

1111
init:
12-
@go get -u golang.org/x/lint/golint
12+
@go install golang.org/x/lint/golint@latest
13+
@go install honnef.co/go/tools/cmd/staticcheck@latest
1314

1415
lint: ## Lint the files
1516
@golint -set_exit_status ${PKG_LIST}
@@ -29,6 +30,6 @@ benchmark: ## Run benchmarks
2930
help: ## Display this help screen
3031
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
3132

32-
goversion ?= "1.16"
33-
test_version: ## Run tests inside Docker with given version (defaults to 1.16 oldest supported). Example: make test_version goversion=1.16
33+
goversion ?= "1.17"
34+
test_version: ## Run tests inside Docker with given version (defaults to 1.17 oldest supported). Example: make test_version goversion=1.17
3435
@docker run --rm -it -v $(shell pwd):/project golang:$(goversion) /bin/sh -c "cd /project && make init check"

0 commit comments

Comments
 (0)