mirror of
https://github.com/gin-gonic/gin.git
synced 2026-07-02 07:44:06 +08:00
docs: fix BindXML comment referencing nonexistent binding.BindXML (#4717)
The doc comment on line 790 read: "BindXML is a shortcut for c.MustBindWith(obj, binding.BindXML)." `binding.BindXML` does not exist. The correct symbol is `binding.XML` (defined in binding/binding.go), which is also what the implementation uses. All sibling methods (BindJSON, BindYAML, BindTOML, etc.) already reference the correct symbol in their comments.
This commit is contained in:
parent
03f3e420a3
commit
34dac209ff
@ -787,7 +787,7 @@ func (c *Context) BindJSON(obj any) error {
|
||||
return c.MustBindWith(obj, binding.JSON)
|
||||
}
|
||||
|
||||
// BindXML is a shortcut for c.MustBindWith(obj, binding.BindXML).
|
||||
// BindXML is a shortcut for c.MustBindWith(obj, binding.XML).
|
||||
func (c *Context) BindXML(obj any) error {
|
||||
return c.MustBindWith(obj, binding.XML)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user