code: func (e *endpointGitFinder) replaceUrlAlias(aliases map[string]string, rawurl string) (string, bool) {
  	var longestalias string
  	for alias, _ := range aliases {
  		if !strings.HasPrefix(rawurl, alias) {
  			continue
  		}
  
  		if longestalias < alias {
  			longestalias = alias
  		}
  	}
  
  	if len(longestalias) > 0 {
  		return aliases[longestalias] + rawurl[len(longestalias):], true
  	}
  
  	return rawurl, false
  }
docs: // replaceUrlAlias is a helper function for ReplaceUrlAlias.  It must only be
  // called while the e.aliasMu mutex is held.