mirror of
https://github.com/labstack/echo.git
synced 2025-04-23 12:18:53 +02:00
Updated docs
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
0b53f397ad
commit
a098bcd3b0
@ -21,7 +21,7 @@ type (
|
|||||||
func NewStats() *Stats {
|
func NewStats() *Stats {
|
||||||
return &Stats{
|
return &Stats{
|
||||||
Uptime: time.Now(),
|
Uptime: time.Now(),
|
||||||
Statuses: make(map[string]int),
|
Statuses: map[string]int{},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ type (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Hosts
|
// Hosts
|
||||||
hosts := make(map[string]*Host)
|
hosts := map[string]*Host{}
|
||||||
|
|
||||||
//-----
|
//-----
|
||||||
// API
|
// API
|
||||||
|
@ -9,6 +9,6 @@ type (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// DefaultSkipper returns false which processes the middleware.
|
// DefaultSkipper returns false which processes the middleware.
|
||||||
func DefaultSkipper(c echo.Context) bool {
|
func DefaultSkipper(echo.Context) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ func NewRouter(e *Echo) *Router {
|
|||||||
tree: &node{
|
tree: &node{
|
||||||
methodHandler: new(methodHandler),
|
methodHandler: new(methodHandler),
|
||||||
},
|
},
|
||||||
routes: make(map[string]Route),
|
routes: map[string]Route{},
|
||||||
echo: e,
|
echo: e,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
> 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).
|
a certificate from [CA](https://en.wikipedia.org/wiki/Certificate_authority).
|
||||||
|
|
||||||
### Configure a server with `engine.Config`
|
## Server
|
||||||
|
|
||||||
`server.go`
|
`server.go`
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user