aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShenghou Ma <minux@golang.org>2015-10-07 20:07:56 -0400
committerMinux Ma <minux@golang.org>2015-10-23 22:22:49 +0000
commit9b6069bf983678b2f490be029d493e711bf80bd9 (patch)
tree6b06d27d0004e07182b5b6d4c10d0a9d9e17f405 /src
parent9238cbd57a116c63104df6ed5a5a85e7097b8386 (diff)
downloadgo-9b6069bf983678b2f490be029d493e711bf80bd9.tar.xz
net/url: fix mentions of URL.EscapedPath method
Fixes #12862. Change-Id: I6921ae31bd5515f344fd97d08eafc317228b98a0 Reviewed-on: https://go-review.googlesource.com/15590 Reviewed-by: Andrew Gerrand <adg@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/net/url/url.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net/url/url.go b/src/net/url/url.go
index 7f648e3b39..5dc5260ff5 100644
--- a/src/net/url/url.go
+++ b/src/net/url/url.go
@@ -264,7 +264,7 @@ func escape(s string, mode encoding) string {
// Go 1.5 introduced the RawPath field to hold the encoded form of Path.
// The Parse function sets both Path and RawPath in the URL it returns,
// and URL's String method uses RawPath if it is a valid encoding of Path,
-// by calling the EncodedPath method.
+// by calling the EscapedPath method.
//
// In earlier versions of Go, the more indirect workarounds were that an
// HTTP server could consult req.RequestURI and an HTTP client could
@@ -449,7 +449,7 @@ func parse(rawurl string, viaRequest bool) (url *URL, err error) {
goto Error
}
// RawPath is a hint as to the encoding of Path to use
- // in url.EncodedPath. If that method already gets the
+ // in url.EscapedPath. If that method already gets the
// right answer without RawPath, leave it empty.
// This will help make sure that people don't rely on it in general.
if url.EscapedPath() != rest && validEncodedPath(rest) {
@@ -614,7 +614,7 @@ func validOptionalPort(port string) bool {
//
// If u.Opaque is non-empty, String uses the first form;
// otherwise it uses the second form.
-// To obtain the path, String uses u.EncodedPath().
+// To obtain the path, String uses u.EscapedPath().
//
// In the second form, the following rules apply:
// - if u.Scheme is empty, scheme: is omitted.