File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -351,11 +351,14 @@ func escape(s string, mode encoding) string {
351
351
// Note that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.
352
352
// A consequence is that it is impossible to tell which slashes in the Path were
353
353
// slashes in the raw URL and which were %2f. This distinction is rarely important,
354
- // but when it is, the code should use RawPath, an optional field which only gets
355
- // set if the default encoding is different from Path.
354
+ // but when it is, the code should use the EscapedPath method, which preserves
355
+ // the original encoding of Path.
356
356
//
357
- // URL's String method uses the EscapedPath method to obtain the path. See the
358
- // EscapedPath method for more details.
357
+ // The RawPath field is an optional field which is only set when the default
358
+ // encoding of Path is different from the escaped path. See the EscapedPath method
359
+ // for more details.
360
+ //
361
+ // URL's String method uses the EscapedPath method to obtain the path.
359
362
type URL struct {
360
363
Scheme string
361
364
Opaque string // encoded opaque data
You can’t perform that action at this time.
0 commit comments