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

Method AsOpenChildren

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

1140// APIError carries them, or nil otherwise. Returns nil for any error
1141// other than "open_children" so callers can branch cleanly.
1142func (e *APIError) AsOpenChildren() *OpenChildrenDetails {
1143 if e == nil || e.Code != "open_children" || len(e.Details) == 0 {
1144 return nil
1145 }
1146 var d OpenChildrenDetails
1147 if err := json.Unmarshal(e.Details, &d); err != nil {
1148 return nil
1149 }
1150 return &d
1151}
1152
1153// StructuredErrorMarker is the versioned line prefix the CLI writes
1154// 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