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

Method AsOpenChildren

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

1091// APIError carries them, or nil otherwise. Returns nil for any error
1092// other than "open_children" so callers can branch cleanly.
1093func (e *APIError) AsOpenChildren() *OpenChildrenDetails {
1094 if e == nil || e.Code != "open_children" || len(e.Details) == 0 {
1095 return nil
1096 }
1097 var d OpenChildrenDetails
1098 if err := json.Unmarshal(e.Details, &d); err != nil {
1099 return nil
1100 }
1101 return &d
1102}
1103
1104// StructuredErrorMarker is the versioned line prefix the CLI writes
1105// to stderr when surfacing a structured error (currently: IDEA-1494's

Callers 3

updateCmdFunction · 0.80
moveCmdFunction · 0.80
bulkUpdateCmdFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected