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

Function buildProjectNode

apps/cli/internal/cli/project_registry.go:288–300  ·  view source on GitHub ↗
(id, name, path string)

Source from the content-addressed store, hash-verified

286}
287
288func buildProjectNode(id, name, path string) *yaml.Node {
289 return &yaml.Node{
290 Kind: yaml.MappingNode,
291 Content: []*yaml.Node{
292 {Kind: yaml.ScalarNode, Value: "id", Tag: "!!str"},
293 {Kind: yaml.ScalarNode, Value: id, Tag: "!!str"},
294 {Kind: yaml.ScalarNode, Value: "name", Tag: "!!str"},
295 {Kind: yaml.ScalarNode, Value: name, Tag: "!!str"},
296 {Kind: yaml.ScalarNode, Value: "path", Tag: "!!str"},
297 {Kind: yaml.ScalarNode, Value: path, Tag: "!!str"},
298 },
299 }
300}
301
302// removeProjectNode removes a project entry matching key=val from the projects sequence.
303// Returns the removed project's ID and true, or "" and false if not found.

Callers 1

appendProjectNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected