mirror of
https://github.com/infinite-iroha/touka.git
synced 2026-06-13 15:47:38 +08:00
docs: 修复文档中的API方法名和参数错误
- 更新quickstart.md中的Go版本要求为1.26 - 修复routing.md中使用setter方法而不是直接属性赋值 - 修复middleware.md中GetHeader为GetReqHeader - 更新context.md移除未实现的binding标签 - 修复static-files.md中SetUnMatchFS的参数签名 - 修复advanced.md中SetMaxReader为SetGlobalMaxRequestBodySize
This commit is contained in:
parent
c4c0160b5f
commit
8af515059a
6 changed files with 9 additions and 9 deletions
|
|
@ -33,12 +33,12 @@ r.POST("/form_post", func(c *touka.Context) {
|
|||
|
||||
### JSON 绑定
|
||||
|
||||
Touka 提供了非常便捷的 JSON 绑定功能,它会自动解析请求体并填充到结构体中,同时进行基本的验证。
|
||||
Touka 提供了非常便捷的 JSON 绑定功能,它会自动解析请求体并填充到结构体中。
|
||||
|
||||
```go
|
||||
type LoginRequest struct {
|
||||
User string `json:"user" binding:"required"`
|
||||
Password string `json:"password" binding:"required"`
|
||||
User string `json:"user"`
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
r.POST("/login", func(c *touka.Context) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue