code: func NormalizeGerritURL(gerritURL string) (string, error) {
  	u, err := url.Parse(gerritURL)
  	if err != nil {
  		return "", err
  	}
  	if u.Scheme != "https" {
  		return "", fmt.Errorf("%s should start with https://", gerritURL)
  	}
  	if !strings.HasSuffix(u.Host, "-review.googlesource.com") {
  		return "", errors.New("only *-review.googlesource.com Gerrits supported")
  	}
  	if u.Fragment != "" {
  		return "", errors.New("no fragments allowed in gerritURL")
  	}
  	if u.Path != "" && u.Path != "/" {
  		return "", errors.New("Unexpected path in URL")
  	}
  	if u.Path != "/" {
  		u.Path = "/"
  	}
  	return u.String(), nil
  }
docs: // NormalizeGerritURL returns canonical for Gerrit URL.
  //
  // error is returned if validation fails.