GenerateWebURL creates a web URL for Octopus Deploy resources host: base URL (e.g., "http://localhost:8066") spaceID: space identifier (e.g., "Spaces-1") path: resource-specific path (e.g., "projects?projectGroupId=ProjectGroups-1")
(host, spaceID, path string)
| 300 | // spaceID: space identifier (e.g., "Spaces-1") |
| 301 | // path: resource-specific path (e.g., "projects?projectGroupId=ProjectGroups-1") |
| 302 | func GenerateWebURL(host, spaceID, path string) string { |
| 303 | // Ensure host doesn't end with slash |
| 304 | host = strings.TrimSuffix(host, "/") |
| 305 | // Ensure path doesn't start with slash |
| 306 | path = strings.TrimPrefix(path, "/") |
| 307 | return fmt.Sprintf("%s/app#/%s/%s", host, spaceID, path) |
| 308 | } |
no outgoing calls
no test coverage detected