buildListProjects returns a function that loads the global project registry and converts entries to web.ProjectEntry values.
()
| 142 | // buildListProjects returns a function that loads the global project registry |
| 143 | // and converts entries to web.ProjectEntry values. |
| 144 | func buildListProjects() func() ([]web.ProjectEntry, error) { |
| 145 | return func() ([]web.ProjectEntry, error) { |
| 146 | entries, err := LoadGlobalRegistry() |
| 147 | if err != nil { |
| 148 | return nil, err |
| 149 | } |
| 150 | projects := make([]web.ProjectEntry, len(entries)) |
| 151 | for i, e := range entries { |
| 152 | projects[i] = web.ProjectEntry{ID: e.ID, Name: e.Name, Path: e.Path} |
| 153 | } |
| 154 | return projects, nil |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | // buildResolveProject returns a function that resolves a project ID to its |
| 159 | // scan directory and phases, reading directly from the project's .taskmd.yaml. |
no test coverage detected