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

Method AsOpenChildren

internal/cli/client.go:2420–2429  ·  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

2418// APIError carries them, or nil otherwise. Returns nil for any error
2419// other than "open_children" so callers can branch cleanly.
2420func (e *APIError) AsOpenChildren() *OpenChildrenDetails {
2421 if e == nil || e.Code != "open_children" || len(e.Details) == 0 {
2422 return nil
2423 }
2424 var d OpenChildrenDetails
2425 if err := json.Unmarshal(e.Details, &d); err != nil {
2426 return nil
2427 }
2428 return &d
2429}
2430
2431// StructuredErrorMarker is the versioned line prefix the CLI writes
2432// 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