1
0
mirror of https://github.com/golang/go synced 2024-11-18 21:44:45 -07:00

net/url: document that Query returns only valid values

Fixes #19110

Change-Id: I291fa4ec3c61145162acd019e3f0e5dd3d7c97e9
Reviewed-on: https://go-review.googlesource.com/37194
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Kenny Grant 2017-02-18 07:28:49 +00:00 committed by Brad Fitzpatrick
parent 6cfc3b25e9
commit 1e69aefb7e

View File

@ -974,6 +974,8 @@ func (u *URL) ResolveReference(ref *URL) *URL {
}
// Query parses RawQuery and returns the corresponding values.
// It silently discards malformed value pairs.
// To check errors use ParseQuery.
func (u *URL) Query() Values {
v, _ := ParseQuery(u.RawQuery)
return v