MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / AsOpenChildren

Method AsOpenChildren

internal/cli/client.go:2731–2740  ·  view source on GitHub ↗

AsOpenChildren returns the parsed open-children details when this APIError carries them, or nil otherwise. Returns nil for any error other than "open_children" so callers can branch cleanly.

()

Source from the content-addressed store, hash-verified

2729// APIError carries them, or nil otherwise. Returns nil for any error
2730// other than "open_children" so callers can branch cleanly.
2731func (e *APIError) AsOpenChildren() *OpenChildrenDetails {
2732 if e == nil || e.Code != "open_children" || len(e.Details) == 0 {
2733 return nil
2734 }
2735 var d OpenChildrenDetails
2736 if err := json.Unmarshal(e.Details, &d); err != nil {
2737 return nil
2738 }
2739 return &d
2740}
2741
2742// StructuredErrorMarker is the versioned line prefix the CLI writes
2743// to stderr when surfacing a structured error (currently: IDEA-1494's

Callers 4

updateCmdFunction · 0.80
moveCmdFunction · 0.80
bulkUpdateCmdFunction · 0.80

Calls

no outgoing calls

Tested by 1