mirror of
https://github.com/golang/go
synced 2024-11-24 04:30:14 -07:00
net/url: fix regex typo in comment in url.go
The original author almost certainly intended to match the literal dash
character '-' but ended up matching a range of other characters instead.
Change-Id: I7a0f67c5fdccd70b7ad58a882da851dfc22ce2f0
GitHub-Last-Rev: 76a39577e5
GitHub-Pull-Request: golang/go#52627
Reviewed-on: https://go-review.googlesource.com/c/go/+/403076
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
0ebe224628
commit
fd6c556dc8
@ -428,7 +428,7 @@ func (u *Userinfo) String() string {
|
||||
}
|
||||
|
||||
// Maybe rawURL is of the form scheme:path.
|
||||
// (Scheme must be [a-zA-Z][a-zA-Z0-9+-.]*)
|
||||
// (Scheme must be [a-zA-Z][a-zA-Z0-9+.-]*)
|
||||
// If so, return scheme, path; else return "", rawURL.
|
||||
func getScheme(rawURL string) (scheme, path string, err error) {
|
||||
for i := 0; i < len(rawURL); i++ {
|
||||
|
Loading…
Reference in New Issue
Block a user