mirror of
https://github.com/golang/go
synced 2024-11-17 16:04:47 -07:00
Fix typo in regex
The original author almost certainly intended to match the literal dash character '-' but ended up matching a range of other characters instead.
This commit is contained in:
parent
f2b674756b
commit
76a39577e5
@ -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