diff --git a/AUTHORS.md b/AUTHORS.md index b4773ef3..fe2e7e35 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -377,6 +377,7 @@ People and companies, who have contributed, in alphabetical order. - vinhha96 - voidman - vz +- webstradev - wei - weibaohui - whirosan diff --git a/context.go b/context.go index b1352b9b..4c24ce60 100644 --- a/context.go +++ b/context.go @@ -525,7 +525,7 @@ func (c *Context) PostFormArray(key string) (values []string) { return } -func (c *Context) initFormCache() { +func (c *Context) InitFormCache() { if c.formCache == nil { c.formCache = make(url.Values) req := c.Request @@ -541,7 +541,7 @@ func (c *Context) initFormCache() { // GetPostFormArray returns a slice of strings for a given form key, plus // a boolean value whether at least one value exists for the given key. func (c *Context) GetPostFormArray(key string) (values []string, ok bool) { - c.initFormCache() + c.InitFormCache() values, ok = c.formCache[key] return } @@ -555,7 +555,7 @@ func (c *Context) PostFormMap(key string) (dicts map[string]string) { // GetPostFormMap returns a map for a given form key, plus a boolean value // whether at least one value exists for the given key. func (c *Context) GetPostFormMap(key string) (map[string]string, bool) { - c.initFormCache() + c.InitFormCache() return c.get(c.formCache, key) }