code: func Parse(rawurl string) (*URL, error) {
  	if urlSchemeRegexp.MatchString(rawurl) &&
  		(runtime.GOOS != "windows" || !dosDriveRegexp.MatchString(rawurl)) {
  		u, err := url.Parse(rawurl)
  		if err != nil {
  			return nil, err
  		}
  		if u.Scheme == "file" && u.Opaque == "" {
  			if u.Host != "" {
  				return nil, fmt.Errorf("file url %q has non-empty host %q", rawurl, u.Host)
  			}
  			if runtime.GOOS == "windows" && (len(u.Path) == 0 || !filepath.IsAbs(u.Path[1:])) {
  				return nil, fmt.Errorf("file url %q has non-absolute path %q", rawurl, u.Path)
  			}
  		}
  
  		return &URL{
  			URL:  *u,
  			Type: URLTypeURL,
  		}, nil
  	}
  
  	s, fragment := splitOnByte(rawurl, '#')
  
  	if m := scpRegexp.FindStringSubmatch(s); m != nil &&
  		(runtime.GOOS != "windows" || !dosDriveRegexp.MatchString(s)) {
  		u := &url.URL{
  			Host:     m[2],
  			Path:     m[3],
  			Fragment: fragment,
  		}
  		if m[1] != "" {
  			u.User = url.User(m[1])
  		}
  
  		return &URL{
  			URL:  *u,
  			Type: URLTypeSCP,
  		}, nil
  	}
  
  	return &URL{
  		URL: url.URL{
  			Path:     s,
  			Fragment: fragment,
  		},
  		Type: URLTypeLocal,
  	}, nil
  }
docs: // Parse parses a "Git URL"