mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-15 21:06:39 +08:00
Optimize the initFormCache method of the Context struct
This commit is contained in:
parent
7a865dcf1d
commit
3c531156ff
@ -538,7 +538,6 @@ func (c *Context) PostFormArray(key string) (values []string) {
|
|||||||
|
|
||||||
func (c *Context) initFormCache() {
|
func (c *Context) initFormCache() {
|
||||||
if c.formCache == nil {
|
if c.formCache == nil {
|
||||||
c.formCache = make(url.Values)
|
|
||||||
req := c.Request
|
req := c.Request
|
||||||
if err := req.ParseMultipartForm(c.engine.MaxMultipartMemory); err != nil {
|
if err := req.ParseMultipartForm(c.engine.MaxMultipartMemory); err != nil {
|
||||||
if !errors.Is(err, http.ErrNotMultipart) {
|
if !errors.Is(err, http.ErrNotMultipart) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user