mirror of
https://github.com/gin-gonic/gin.git
synced 2025-04-06 03:57:46 +08:00
fix(binding): prevent duplicate decoding and add validation in decodeToml (#4193)
This commit is contained in:
parent
4ccfa7c275
commit
e737e3e267
@ -31,5 +31,5 @@ func decodeToml(r io.Reader, obj any) error {
|
||||
if err := decoder.Decode(obj); err != nil {
|
||||
return err
|
||||
}
|
||||
return decoder.Decode(obj)
|
||||
return validate(obj)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user