sync from project
This commit is contained in:
@ -159,7 +159,7 @@ func (query *Query[T]) FromRequest(r *http.Request) error {
|
||||
|
||||
if structField.Kind() == reflect.Slice && structField.Len() < len(values) {
|
||||
if structField.Cap() < len(values) {
|
||||
structField.SetCap(len(values))
|
||||
structField.Grow(len(values) - structField.Cap())
|
||||
}
|
||||
structField.SetLen(len(values))
|
||||
}
|
||||
|
Reference in New Issue
Block a user