docs: document ShouldBindBodyWithProtoBuf shortcut

This commit is contained in:
1911860538 2026-05-23 22:47:06 +08:00
parent cb82095769
commit e83cdcc9e4

View File

@ -1576,6 +1576,7 @@ For this, you can use `c.ShouldBindBodyWith` or shortcuts.
- `c.ShouldBindBodyWithXML` is a shortcut for c.ShouldBindBodyWith(obj, binding.XML). - `c.ShouldBindBodyWithXML` is a shortcut for c.ShouldBindBodyWith(obj, binding.XML).
- `c.ShouldBindBodyWithYAML` is a shortcut for c.ShouldBindBodyWith(obj, binding.YAML). - `c.ShouldBindBodyWithYAML` is a shortcut for c.ShouldBindBodyWith(obj, binding.YAML).
- `c.ShouldBindBodyWithTOML` is a shortcut for c.ShouldBindBodyWith(obj, binding.TOML). - `c.ShouldBindBodyWithTOML` is a shortcut for c.ShouldBindBodyWith(obj, binding.TOML).
- `c.ShouldBindBodyWithProtoBuf` is a shortcut for c.ShouldBindBodyWith(obj, binding.ProtoBuf).
```go ```go
func SomeHandler(c *gin.Context) { func SomeHandler(c *gin.Context) {