(ctx context.Context, rawWorkspace string)
| 2073 | } |
| 2074 | |
| 2075 | func (h *HostAPIHandler) resolveWorkspaceID(ctx context.Context, rawWorkspace string) (string, error) { |
| 2076 | trimmed := strings.TrimSpace(rawWorkspace) |
| 2077 | if trimmed == "" { |
| 2078 | return "", nil |
| 2079 | } |
| 2080 | if h.workspaces == nil { |
| 2081 | return trimmed, nil |
| 2082 | } |
| 2083 | resolved, err := h.workspaces.Resolve(ctx, trimmed) |
| 2084 | if err != nil { |
| 2085 | return "", err |
| 2086 | } |
| 2087 | return hostAPIResolvedWorkspaceID(&resolved) |
| 2088 | } |
| 2089 | |
| 2090 | func (h *HostAPIHandler) resolveRequiredWorkspaceID(ctx context.Context, rawWorkspace string) (string, error) { |
| 2091 | workspaceID, err := h.resolveWorkspaceID(ctx, rawWorkspace) |
no test coverage detected