diff --git a/README.md b/README.md index 050842f..701f3a4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ HTTP server. ## Features -- Specificity based routing +- Low latency +- Radix tree routing ## Installation @@ -17,33 +18,22 @@ go get git.akyoto.dev/go/server ```go s := server.New() -// Add your routes here. - -http.ListenAndServe(":8080", s) -``` - -### Static - -```go +// Static route s.Get("/", func(ctx server.Context) error { return ctx.String("Hello") }) -``` -### Parameter - -```go +// Parameter route s.Get("/blog/:post", func(ctx server.Context) error { return ctx.String(ctx.Get("post")) }) -``` -### Wildcard - -```go +// Wildcard route s.Get("/images/*file", func(ctx server.Context) error { return ctx.String(ctx.Get("file")) }) + +http.ListenAndServe(":8080", s) ``` ## Tests @@ -57,6 +47,7 @@ coverage: 100.0% of statements ## Benchmarks ``` +coming soon ``` ## License