Skip to content

Commit c0c00e6

Browse files
committed
V5.0.0-alpha
1 parent 4a1ccdf commit c0c00e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+9654
-7212
lines changed

.github/workflows/echo.yml

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ on:
1919
- '_fixture/**'
2020
- '.github/**'
2121
- 'codecov.yml'
22+
workflow_dispatch: # to be able to run workflow manually
2223

2324
jobs:
2425
test:
@@ -27,28 +28,18 @@ jobs:
2728
os: [ubuntu-latest, macos-latest, windows-latest]
2829
# Each major Go release is supported until there are two newer major releases. https://golang.org/doc/devel/release.html#policy
2930
# Echo tests with last four major releases
30-
go: [1.14, 1.15, 1.16, 1.17]
31+
# except v5 starts from 1.17 until there is last four major releases after that
32+
go: [1.17]
3133
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
3234
runs-on: ${{ matrix.os }}
3335
steps:
3436
- name: Set up Go ${{ matrix.go }}
35-
uses: actions/setup-go@v1
37+
uses: actions/setup-go@v2
3638
with:
3739
go-version: ${{ matrix.go }}
3840

39-
- name: Set GOPATH and PATH
40-
run: |
41-
echo "GOPATH=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV
42-
echo "$(dirname $GITHUB_WORKSPACE)/bin" >> $GITHUB_PATH
43-
shell: bash
44-
45-
- name: Set build variables
46-
run: |
47-
echo "GOPROXY=https://proxy.golang.org" >> $GITHUB_ENV
48-
echo "GO111MODULE=on" >> $GITHUB_ENV
49-
5041
- name: Checkout Code
51-
uses: actions/checkout@v1
42+
uses: actions/checkout@v2
5243
with:
5344
ref: ${{ github.ref }}
5445

@@ -62,10 +53,10 @@ jobs:
6253
6354
- name: Upload coverage to Codecov
6455
if: success() && matrix.go == 1.17 && matrix.os == 'ubuntu-latest'
65-
uses: codecov/codecov-action@v1
56+
uses: codecov/codecov-action@v2
6657
with:
67-
token:
6858
fail_ci_if_error: false
59+
6960
benchmark:
7061
needs: test
7162
strategy:
@@ -76,21 +67,10 @@ jobs:
7667
runs-on: ${{ matrix.os }}
7768
steps:
7869
- name: Set up Go ${{ matrix.go }}
79-
uses: actions/setup-go@v1
70+
uses: actions/setup-go@v2
8071
with:
8172
go-version: ${{ matrix.go }}
8273

83-
- name: Set GOPATH and PATH
84-
run: |
85-
echo "GOPATH=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV
86-
echo "$(dirname $GITHUB_WORKSPACE)/bin" >> $GITHUB_PATH
87-
shell: bash
88-
89-
- name: Set build variables
90-
run: |
91-
echo "GOPROXY=https://proxy.golang.org" >> $GITHUB_ENV
92-
echo "GO111MODULE=on" >> $GITHUB_ENV
93-
9474
- name: Checkout Code (Previous)
9575
uses: actions/checkout@v2
9676
with:

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2021 LabStack
3+
Copyright (c) 2022 LabStack
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ race: ## Run tests with data race detector
2424
@go test -race ${PKG_LIST}
2525

2626
benchmark: ## Run benchmarks
27-
@go test -run="-" -bench=".*" ${PKG_LIST}
27+
@go test -run="-" -benchmem -bench=".*" ${PKG_LIST}
2828

2929
help: ## Display this help screen
3030
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
3131

32-
goversion ?= "1.15"
33-
test_version: ## Run tests inside Docker with given version (defaults to 1.15 oldest supported). Example: make test_version goversion=1.15
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
3434
@docker run --rm -it -v $(shell pwd):/project golang:$(goversion) /bin/sh -c "cd /project && make init check"

README.md

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111

1212
## Supported Go versions
1313

14+
Echo supports last four major releases. `v5` starts from 1.16 until there is last four major releases after that.
15+
1416
As of version 4.0.0, Echo is available as a [Go module](https://github.com/golang/go/wiki/Modules).
1517
Therefore a Go version capable of understanding /vN suffixed imports is required:
1618

1719
- 1.9.7+
1820
- 1.10.3+
19-
- 1.14+
21+
- 1.16+
2022

2123
Any of these versions will allow you to import Echo as `github.com/labstack/echo/v4` which is the recommended
2224
way of using Echo going forward.
@@ -39,24 +41,13 @@ For older versions, please use the latest v3 tag.
3941
- Automatic TLS via Let’s Encrypt
4042
- HTTP/2 support
4143

42-
## Benchmarks
43-
44-
Date: 2020/11/11<br>
45-
Source: https://github.com/vishr/web-framework-benchmark<br>
46-
Lower is better!
47-
48-
<img src="https://i.imgur.com/qwPNQbl.png">
49-
<img src="https://i.imgur.com/s8yKQjx.png">
50-
51-
The benchmarks above were run on an Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
52-
5344
## [Guide](https://echo.labstack.com/guide)
5445

5546
### Installation
5647

5748
```sh
5849
// go get github.com/labstack/echo/{version}
59-
go get github.com/labstack/echo/v4
50+
go get github.com/labstack/echo/v5
6051
```
6152

6253
### Example
@@ -65,8 +56,8 @@ go get github.com/labstack/echo/v4
6556
package main
6657

6758
import (
68-
"github.com/labstack/echo/v4"
69-
"github.com/labstack/echo/v4/middleware"
59+
"github.com/labstack/echo/v5"
60+
"github.com/labstack/echo/v5/middleware"
7061
"net/http"
7162
)
7263

@@ -82,7 +73,9 @@ func main() {
8273
e.GET("/", hello)
8374

8475
// Start server
85-
e.Logger.Fatal(e.Start(":1323"))
76+
if err := e.Start(":1323"); err != http.ErrServerClosed {
77+
log.Fatal(err)
78+
}
8679
}
8780

8881
// Handler
@@ -93,15 +86,15 @@ func hello(c echo.Context) error {
9386

9487
# Third-party middlewares
9588

96-
| Repository | Description |
97-
|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
98-
| [github.com/labstack/echo-contrib](https://github.com/labstack/echo-contrib) | (by Echo team) [casbin](https://github.com/casbin/casbin), [gorilla/sessions](https://github.com/gorilla/sessions), [jaegertracing](github.com/uber/jaeger-client-go), [prometheus](https://github.com/prometheus/client_golang/), [pprof](https://pkg.go.dev/net/http/pprof), [zipkin](https://github.com/openzipkin/zipkin-go) middlewares |
99-
| [deepmap/oapi-codegen](https://github.com/deepmap/oapi-codegen) | Automatically generate RESTful API documentation with [OpenAPI](https://swagger.io/specification/) Client and Server Code Generator |
100-
| [github.com/swaggo/echo-swagger](https://github.com/swaggo/echo-swagger) | Automatically generate RESTful API documentation with [Swagger](https://swagger.io/) 2.0. |
101-
| [github.com/ziflex/lecho](https://github.com/ziflex/lecho) | [Zerolog](https://github.com/rs/zerolog) logging library wrapper for Echo logger interface. |
102-
| [github.com/brpaz/echozap](https://github.com/brpaz/echozap) | Uber´s [Zap](https://github.com/uber-go/zap) logging library wrapper for Echo logger interface. |
103-
| [github.com/darkweak/souin/plugins/echo](https://github.com/darkweak/souin/tree/master/plugins/echo) | HTTP cache system based on [Souin](https://github.com/darkweak/souin) to automatically get your endpoints cached. It supports some distributed and non-distributed storage systems depending your needs. |
104-
| [github.com/mikestefanello/pagoda](https://github.com/mikestefanello/pagoda) | Rapid, easy full-stack web development starter kit built with Echo.
89+
| Repository | Description |
90+
|------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
91+
| [github.com/labstack/echo-contrib](https://github.com/labstack/echo-contrib) | (by Echo team) [casbin](https://github.com/casbin/casbin), [gorilla/sessions](https://github.com/gorilla/sessions), [jaegertracing](github.com/uber/jaeger-client-go), [prometheus](https://github.com/prometheus/client_golang/), [pprof](https://pkg.go.dev/net/http/pprof), [zipkin](https://github.com/openzipkin/zipkin-go) middlewares |
92+
| [deepmap/oapi-codegen](https://github.com/deepmap/oapi-codegen) | Automatically generate RESTful API documentation with [OpenAPI](https://swagger.io/specification/) Client and Server Code Generator |
93+
| [github.com/swaggo/echo-swagger](https://github.com/swaggo/echo-swagger) | Automatically generate RESTful API documentation with [Swagger](https://swagger.io/) 2.0. |
94+
| [github.com/ziflex/lecho](https://github.com/ziflex/lecho) | [Zerolog](https://github.com/rs/zerolog) logging library wrapper for Echo logger interface. |
95+
| [github.com/brpaz/echozap](https://github.com/brpaz/echozap) | Uber´s [Zap](https://github.com/uber-go/zap) logging library wrapper for Echo logger interface. |
96+
| [github.com/darkweak/souin/plugins/echo](https://github.com/darkweak/souin/tree/master/plugins/echo) | HTTP cache system based on [Souin](https://github.com/darkweak/souin) to automatically get your endpoints cached. It supports some distributed and non-distributed storage systems depending your needs. |
97+
| [github.com/mikestefanello/pagoda](https://github.com/mikestefanello/pagoda) | Rapid, easy full-stack web development starter kit built with Echo. |
10598

10699
Please send a PR to add your own library here.
107100

0 commit comments

Comments
 (0)