Skip to content

Commit

Permalink
more test for docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bughou committed Jan 21, 2022
1 parent 79975d2 commit 230494e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@


## 路径中正则参数(子表达式)说明
type: 用户类型,\id:用户ID

- type (string): 类型
- id (*int): ID

Expand Down
4 changes: 2 additions & 2 deletions docs/z_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func ExampleGroup() {

type T struct {
Type string `c:"类型"`
Id *int `c:"ID"`
Id *int `c:"ID"`
Flag bool `json:"-" c:"标志"`
}

Expand Down Expand Up @@ -63,7 +63,7 @@ func testHandler(req struct {
func testHandler2(req struct {
Title string `用户详情`
Desc string `获取用户的详细信息`
Param T
Param T `c:"type: 用户类型,\\id:用户ID"`
}, resp *struct {
Header struct {
SetCookie string `header:"Set-Cookie" c:"返回登录会话"`
Expand Down

0 comments on commit 230494e

Please sign in to comment.