MCPcopy Index your code
hub / github.com/coder/coder / String

Method String

coderd/workspaceapps/appurl/appurl.go:71–84  ·  view source on GitHub ↗

String returns the application URL hostname without scheme. You will likely want to append a period and the base hostname.

()

Source from the content-addressed store, hash-verified

69// String returns the application URL hostname without scheme. You will likely
70// want to append a period and the base hostname.
71func (a ApplicationURL) String() string {
72 var appURL strings.Builder
73 _, _ = appURL.WriteString(a.Prefix)
74 _, _ = appURL.WriteString(a.AppSlugOrPort)
75 if a.AgentName != "" {
76 _, _ = appURL.WriteString("--")
77 _, _ = appURL.WriteString(a.AgentName)
78 }
79 _, _ = appURL.WriteString("--")
80 _, _ = appURL.WriteString(a.WorkspaceName)
81 _, _ = appURL.WriteString("--")
82 _, _ = appURL.WriteString(a.Username)
83 return appURL.String()
84}
85
86// Path is a helper function to get the url path of the app if it is not served
87// on a subdomain. In practice this is not really used because we use the chi

Callers 15

Test_vscodeProxyURIFunction · 0.95
Test_ResolveRequestFunction · 0.95
AppBaseURLMethod · 0.95
SubdomainAppURLMethod · 0.95
createWorkspaceWithAppsFunction · 0.95
subscriptionsForUserMethod · 0.45
InvalidateUserMethod · 0.45
newSSRFSafeHTTPClientFunction · 0.45
ResolveRequestFunction · 0.45
handleAPIKeySmugglingMethod · 0.45

Calls 1

WriteStringMethod · 0.80

Tested by 9

Test_vscodeProxyURIFunction · 0.76
Test_ResolveRequestFunction · 0.76
TestStatsCollectorFunction · 0.36
Test_RequestValidateFunction · 0.36
TestApplicationURLStringFunction · 0.36