// RemoteURL returns the git URL of app.
552102
func RemoteURL(host, appID string) string {
	// Strip off any trailing :port number after the host name.
	host = strings.Split(host, ":")[0]
	return fmt.Sprintf("ssh://git@%s:2222/%s.git", host, appID)
}
894392
func RemoteChecksumsPath(serverURL string) string {
	url := serverURL
	if url[len(url)-1] != '/' {
		url += "/"
	}

	return url + "MD5SUMS"
}
59075
func (t *Team) GetRepositoriesURL() string {
	if t == nil || t.RepositoriesURL == nil {
		return ""
	}
	return *t.RepositoriesURL
}
49086
func (mr *MockNetworkEntityMockRecorder) RemoteAddr() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteAddr", reflect.TypeOf((*MockNetworkEntity)(nil).RemoteAddr))
}
769956
func (r *Repository) ReadWriteURL() string {
	uid, err := config.GetString("uid")
	if err != nil {
		panic(err.Error())
	}
	remote := uid + "@%s:%s.git"
	if useSSH, _ := config.GetBool("git:ssh:use"); useSSH {
		var port string
		port, err = config.GetString("git:ssh:port")
		if err == nil {
			remote = "ssh://" + uid + "@%s:" + port + "/%s.git"
		} else {
			remote = "ssh://" + uid + "@%s/%s.git"
		}
	}
	host, err := config.GetString("host")
	if err != nil {
		panic(err.Error())
	}
	return fmt.Sprintf(remote, host, r.Name)
}
1301184
func (s *RemoteApplication) URL() (string, bool) {
	return s.doc.URL, s.doc.URL != ""
}
1135098
func (s *Stream) baseUrl() (url string) {
	url = fmt.Sprintf("%s/%s/%s", s.domainName, s.appName, s.StreamName)
	return
}
1311098
func appURL(acdClient argocdclient.Client, appName string) string {
	var scheme string
	opts := acdClient.ClientOptions()
	server := opts.ServerAddr
	if opts.PlainText {
		scheme = "http"
	} else {
		scheme = "https"
		if strings.HasSuffix(opts.ServerAddr, ":443") {
			server = server[0 : len(server)-4]
		}
	}
	return fmt.Sprintf("%s://%s/applications/%s", scheme, server, appName)
}
621620
func (r *RepositoryLicense) GetURL() string {
	if r == nil || r.URL == nil {
		return ""
	}
	return *r.URL
}
635332
func (r *RepositoryContent) GetGitURL() string {
	if r == nil || r.GitURL == nil {
		return ""
	}
	return *r.GitURL
}
1352314
func (c *CommitsComparison) GetURL() string {
	if c == nil || c.URL == nil {
		return ""
	}
	return *c.URL
}
1231936
func (c *Content) IsRepoValidURL() bool {
	r, err := regexp.Compile(`(?:git|ssh|https?|git@[-\w.]+):(\/\/)?(.*?)(\.git)(\/?|\#[-\d\w._]+?)$`)
	if err != nil {
		return false
	}
	return r.MatchString(c.Repository)
}
984504
func (r *Repository) GetSVNURL() string {
	if r == nil || r.SVNURL == nil {
		return ""
	}
	return *r.SVNURL
}
262747
func downloadRemote(remoteURL string) (string, io.ReadCloser, error) {
	response, err := GetWithStatusError(remoteURL)
	if err != nil {
		return "", nil, errors.Wrapf(err, "error downloading remote context %s", remoteURL)
	}

	contentType, contextReader, err := inspectResponse(
		response.Header.Get("Content-Type"),
		response.Body,
		response.ContentLength)
	if err != nil {
		response.Body.Close()
		return "", nil, errors.Wrapf(err, "error detecting content type for remote %s", remoteURL)
	}

	return contentType, ioutils.NewReadCloserWrapper(contextReader, response.Body.Close), nil
}
1147744
func (r *Relation) RemoteApplication() (*RemoteApplication, bool, error) {
	for _, ep := range r.Endpoints() {
		app, err := r.st.RemoteApplication(ep.ApplicationName)
		if err == nil {
			return app, true, nil
		} else if !errors.IsNotFound(err) {
			return nil, false, errors.Trace(err)
		}
	}
	return nil, false, nil
}
1348635
func (c *Configuration) Remote() string {
	ref := c.CurrentRef()

	c.loading.Lock()
	defer c.loading.Unlock()

	if c.currentRemote == nil {
		if len(ref.Name) == 0 {
			c.currentRemote = &defaultRemote
			return defaultRemote
		}

		if remote, ok := c.Git.Get(fmt.Sprintf("branch.%s.remote", ref.Name)); ok {
			// try tracking remote
			c.currentRemote = &remote
		} else if remotes := c.Remotes(); len(remotes) == 1 {
			// use only remote if there is only 1
			c.currentRemote = &remotes[0]
		} else {
			// fall back to default :(
			c.currentRemote = &defaultRemote
		}
	}
	return *c.currentRemote
}
1294534
func (c *AppPackageDeleteCall) Url(url string) *AppPackageDeleteCall {
	c.urlParams_.Set("url", url)
	return c
}