Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed Feb 27, 2019
1 parent 201f300 commit d4ab3ff
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,17 @@ c.SetContentTypeByExt("user.json")
fmt.Println(c.Header())
```

### DisableReuse

禁止context复用,如果context在所有handler执行之后,还需要使用(如设置了超时出错,但无法对正在执行的handler中断,此时context还在使用中),则需要调用此函数禁用context的复用。

```go
req := httptest.NewRequest("GET", "/users/me", nil)
resp := httptest.NewRecorder()
c := cod.NewContext(resp, req)
c.DisableReuse()
```

## Group

### NewGroup
Expand Down

0 comments on commit d4ab3ff

Please sign in to comment.