(raw string)
| 2537 | } |
| 2538 | |
| 2539 | func resolveMemoryWorkspace(raw string) (string, error) { |
| 2540 | trimmed := strings.TrimSpace(raw) |
| 2541 | if trimmed == "" { |
| 2542 | return "", NewMemoryValidationError(errors.New("workspace is required for workspace scope")) |
| 2543 | } |
| 2544 | |
| 2545 | workspace, err := filepath.Abs(filepath.Clean(trimmed)) |
| 2546 | if err != nil { |
| 2547 | return "", fmt.Errorf("resolve workspace %q: %w", trimmed, err) |
| 2548 | } |
| 2549 | return workspace, nil |
| 2550 | } |
| 2551 | |
| 2552 | func resolveMemoryScopeAndWorkspace(rawScope string, rawWorkspace string) (memcontract.Scope, string, error) { |
| 2553 | scope, err := parseOptionalMemoryScope(rawScope) |
no test coverage detected