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
carlmjohnson opened this issue Aug 5, 2016 · 7 comments

Comments

Projects
None yet
6 participants
@carlmjohnson
Copy link
Contributor

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

This comment has been minimized.

Copy link
Member

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 label Oct 7, 2016

@odeke-em

This comment has been minimized.

Copy link
Member

commented Oct 25, 2016

@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

This comment has been minimized.

Copy link
Contributor

commented Oct 25, 2016

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

@carlmjohnson

This comment has been minimized.

Copy link
Contributor Author

commented Oct 25, 2016

I can try to look at this tonight.

@carlmjohnson

This comment has been minimized.

Copy link
Contributor Author

commented Oct 26, 2016

@gopherbot

This comment has been minimized.

Copy link

commented Oct 26, 2016

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

@carlmjohnson

This comment has been minimized.

Copy link
Contributor Author

commented Oct 26, 2016

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…

@gopherbot gopherbot closed this in 117c9c3 Oct 26, 2016

@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.
You can’t perform that action at this time.