MCPcopy Create free account
hub / github.com/driangle/taskmd / buildListProjects

Function buildListProjects

apps/cli/internal/cli/web.go:144–156  ·  view source on GitHub ↗

buildListProjects returns a function that loads the global project registry and converts entries to web.ProjectEntry values.

()

Source from the content-addressed store, hash-verified

142// buildListProjects returns a function that loads the global project registry
143// and converts entries to web.ProjectEntry values.
144func 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.

Callers 1

runWebStartFunction · 0.85

Calls 1

LoadGlobalRegistryFunction · 0.85

Tested by

no test coverage detected