diff --git a/cookbook/middleware/server.go b/cookbook/middleware/server.go index 2f21df50..9c947b6a 100644 --- a/cookbook/middleware/server.go +++ b/cookbook/middleware/server.go @@ -21,7 +21,7 @@ type ( func NewStats() *Stats { return &Stats{ Uptime: time.Now(), - Statuses: make(map[string]int), + Statuses: map[string]int{}, } } diff --git a/cookbook/subdomains/server.go b/cookbook/subdomains/server.go index ef4f65f9..a502ae2e 100644 --- a/cookbook/subdomains/server.go +++ b/cookbook/subdomains/server.go @@ -15,7 +15,7 @@ type ( func main() { // Hosts - hosts := make(map[string]*Host) + hosts := map[string]*Host{} //----- // API diff --git a/middleware/middleware.go b/middleware/middleware.go index 7edccc1d..efcbab91 100644 --- a/middleware/middleware.go +++ b/middleware/middleware.go @@ -9,6 +9,6 @@ type ( ) // DefaultSkipper returns false which processes the middleware. -func DefaultSkipper(c echo.Context) bool { +func DefaultSkipper(echo.Context) bool { return false } diff --git a/router.go b/router.go index 5cb47116..a8d1f1aa 100644 --- a/router.go +++ b/router.go @@ -47,7 +47,7 @@ func NewRouter(e *Echo) *Router { tree: &node{ methodHandler: new(methodHandler), }, - routes: make(map[string]Route), + routes: map[string]Route{}, echo: e, } } diff --git a/website/content/cookbook/http2.md b/website/content/cookbook/http2.md index 0961f8a1..4eb52afd 100644 --- a/website/content/cookbook/http2.md +++ b/website/content/cookbook/http2.md @@ -31,7 +31,7 @@ This will generate `cert.pem` and `key.pem` files. > For demo purpose, we are using a self-signed certificate. Ideally you should obtain a certificate from [CA](https://en.wikipedia.org/wiki/Certificate_authority). -### Configure a server with `engine.Config` +## Server `server.go`