String returns the application URL hostname without scheme. You will likely want to append a period and the base hostname.
()
| 69 | // String returns the application URL hostname without scheme. You will likely |
| 70 | // want to append a period and the base hostname. |
| 71 | func (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 |