Updated documentation
This commit is contained in:
parent
8bf1bc8f32
commit
23f5227f6c
@ -20,7 +20,7 @@ s := server.New()
|
|||||||
http.ListenAndServe(":8080", s)
|
http.ListenAndServe(":8080", s)
|
||||||
```
|
```
|
||||||
|
|
||||||
Static route:
|
Static:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
s.Get("/", func(ctx server.Context) error {
|
s.Get("/", func(ctx server.Context) error {
|
||||||
@ -28,7 +28,7 @@ s.Get("/", func(ctx server.Context) error {
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
Parameter route:
|
Parameter:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
s.Get("/blog/:post", func(ctx server.Context) error {
|
s.Get("/blog/:post", func(ctx server.Context) error {
|
||||||
@ -36,7 +36,7 @@ s.Get("/blog/:post", func(ctx server.Context) error {
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
Wildcard route:
|
Wildcard:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
s.Get("/images/*file", func(ctx server.Context) error {
|
s.Get("/images/*file", func(ctx server.Context) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user