mirror of https://github.com/golang/go.git
net/http: clarify Request.FormValue docs
Fixes #8067 LGTM=r R=r CC=golang-codereviews https://golang.org/cl/146480043
This commit is contained in:
parent
fe2bc11e1f
commit
705c1f5cd4
|
|
@ -852,7 +852,8 @@ func (r *Request) ParseMultipartForm(maxMemory int64) error {
|
||||||
// POST and PUT body parameters take precedence over URL query string values.
|
// POST and PUT body parameters take precedence over URL query string values.
|
||||||
// FormValue calls ParseMultipartForm and ParseForm if necessary and ignores
|
// FormValue calls ParseMultipartForm and ParseForm if necessary and ignores
|
||||||
// any errors returned by these functions.
|
// any errors returned by these functions.
|
||||||
// To access multiple values of the same key use ParseForm.
|
// To access multiple values of the same key, call ParseForm and
|
||||||
|
// then inspect Request.Form directly.
|
||||||
func (r *Request) FormValue(key string) string {
|
func (r *Request) FormValue(key string) string {
|
||||||
if r.Form == nil {
|
if r.Form == nil {
|
||||||
r.ParseMultipartForm(defaultMaxMemory)
|
r.ParseMultipartForm(defaultMaxMemory)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue