Skip to content

Commit 92307b9

Browse files
committed
Update README.md
1 parent bf97da9 commit 92307b9

File tree

1 file changed

+32
-62
lines changed

1 file changed

+32
-62
lines changed

README.md

Lines changed: 32 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,38 @@
33

44
# [Echo](http://labstack.com/echo) [![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/labstack/echo) [![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/labstack/echo/master/LICENSE) [![Build Status](http://img.shields.io/travis/labstack/echo.svg?style=flat-square)](https://travis-ci.org/labstack/echo) [![Coverage Status](http://img.shields.io/coveralls/labstack/echo.svg?style=flat-square)](https://coveralls.io/r/labstack/echo) [![Join the chat at https://gitter.im/labstack/echo](https://img.shields.io/badge/gitter-join%20chat-brightgreen.svg?style=flat-square)](https://gitter.im/labstack/echo)
55

6-
A fast and unfancy micro web framework for Go.
7-
8-
## Features
9-
10-
- Fast HTTP router which smartly prioritize routes.
11-
- Extensible middleware, supports:
12-
- `echo.MiddlewareFunc`
13-
- `func(echo.HandlerFunc) echo.HandlerFunc`
14-
- `echo.HandlerFunc`
15-
- `func(*echo.Context) error`
16-
- `func(http.Handler) http.Handler`
17-
- `http.Handler`
18-
- `http.HandlerFunc`
19-
- `func(http.ResponseWriter, *http.Request)`
20-
- Extensible handler, supports:
21-
- `echo.HandlerFunc`
22-
- `func(*echo.Context) error`
23-
- `http.Handler`
24-
- `http.HandlerFunc`
25-
- `func(http.ResponseWriter, *http.Request)`
26-
- Sub-router/Groups
27-
- Handy functions to send variety of HTTP response:
28-
- HTML
29-
- HTML via templates
30-
- String
31-
- JSON
32-
- JSONP
33-
- XML
34-
- File
35-
- NoContent
36-
- Redirect
37-
- Error
38-
- Build-in support for:
39-
- Favicon
40-
- Index file
41-
- Static files
42-
- WebSocket
43-
- Centralized HTTP error handling.
44-
- Customizable HTTP request binding function.
45-
- Customizable HTTP response rendering function, allowing you to use any HTML template engine.
6+
## A fast and unfancy micro web framework for Go.
7+
8+
```go
9+
package main
10+
11+
import (
12+
"github.com/labstack/echo"
13+
"github.com/labstack/echo/engine"
14+
"github.com/labstack/echo/engine/fasthttp"
15+
mw "github.com/labstack/echo/middleware"
16+
)
17+
18+
func main() {
19+
e := echo.New()
20+
e.Use(mw.Log())
21+
e.Get("/", func(c echo.Context) error {
22+
return c.String(200, "Hello, World!")
23+
})
24+
e.Get("/v2", func(c echo.Context) error {
25+
return c.String(200, "Echo v2")
26+
})
27+
28+
// FastHTTP
29+
e.RunEngine(fasthttp.NewServer(&engine.Config{
30+
Address: ":4444",
31+
}, e.Handle, e.Logger()))
32+
33+
// Standard
34+
// e.Run(":4444")
35+
}
36+
37+
```
4638

4739
## Performance
4840

@@ -84,28 +76,6 @@ BenchmarkVulcan_GithubAll 5000 271682 ns/op 1989
8476
BenchmarkZeus_GithubAll 2000 748827 ns/op 300688 B/op 2648 allocs/op
8577
```
8678

87-
## Installation
88-
89-
```sh
90-
$ go get github.com/labstack/echo
91-
```
92-
93-
## [Recipes](http://labstack.com/echo/recipes/hello-world)
94-
95-
## [Guide](http://labstack.com/echo/guide/installation)
96-
97-
## Echo System
98-
99-
Community created packages for Echo
100-
101-
- [echo-logrus](https://github.com/deoxxa/echo-logrus)
102-
- [go_middleware](https://github.com/rightscale/go_middleware)
103-
- [permissions2](https://github.com/xyproto/permissions2)
104-
- [permissionbolt](https://github.com/xyproto/permissionbolt)
105-
- [echo-middleware](https://github.com/syntaqx/echo-middleware)
106-
- [dpecho](https://github.com/deferpanic/dpecho)
107-
- [echosentry](https://github.com/01walid/echosentry)
108-
10979
## Contribute
11080

11181
**Use issues for everything**

0 commit comments

Comments
 (0)