Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/http: ambiguous sentence in docs for Response.ParseForm #16609

Closed
earthboundkid opened this issue Aug 5, 2016 · 7 comments
Closed

net/http: ambiguous sentence in docs for Response.ParseForm #16609

earthboundkid opened this issue Aug 5, 2016 · 7 comments
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@earthboundkid
Copy link
Contributor

earthboundkid commented Aug 5, 2016

Please answer these questions before submitting your issue. Thanks!

1 What version of Go are you using (go version)?

go1.6.2

2 What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/cjohnson/Documents/Code/Golang"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.6.2/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.6.2/libexec/pkg/tool/darwin_amd64"
GO15VENDOREXPERIMENT="1"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"

3 What did you do?

$ go doc http.ParseForm
func (r *Request) ParseForm() error
    ParseForm parses the raw query from the URL and updates r.Form.

    For POST or PUT requests, it also parses the request body as a form and put
    the results into both r.PostForm and r.Form. POST and PUT body parameters
    take precedence over URL query string values in r.Form.

    If the request Body's size has not already been limited by MaxBytesReader,
    the size is capped at 10MB.

    ParseMultipartForm calls ParseForm automatically. It is idempotent.

4 What did you expect to see?

Grammatically unambiguous documentation.

5 What did you see instead?

In "It is idempotent," "it" ambiguously refers to ParseForm or ParseMultipartForm or both.

I think it should be ParseForm, but I'm not sure. Maybe both?

@odeke-em
Copy link
Member

odeke-em commented Aug 5, 2016

I just noticed another thing that can be improved in that documentation is fixing the typo
and put the results
to
and puts the results.
@carlmjohnson please feel free to send a CL for Go1.8, and we can review it.

@bradfitz bradfitz changed the title Response.ParseForm: Ambiguous sentence in docs net/http: ambiguous sentence in docs for Response.ParseForm Aug 5, 2016
@bradfitz bradfitz added this to the Go1.8 milestone Aug 5, 2016
@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 7, 2016
@odeke-em
Copy link
Member

@carlmjohnson the Go1.8 freeze begins in a few days, please let me know in the next few if you are interested in closing this otherwise I'll send a CL to fix this. Thanks.

@cespare
Copy link
Contributor

cespare commented Oct 25, 2016

@odeke-em the freeze doesn't so much apply to documentation changes.

@earthboundkid
Copy link
Contributor Author

I can try to look at this tonight.

@earthboundkid
Copy link
Contributor Author

@gopherbot
Copy link

CL https://golang.org/cl/32091 mentions this issue.

@earthboundkid
Copy link
Contributor Author

https://golang.org/cl/70990044 in 2014 changed ParseForm to also update r.PostForm on PATCH, but didn't update the docs to reflect that…

@golang golang locked and limited conversation to collaborators Oct 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

6 participants