MCPcopy Create free account
hub / github.com/cli/cli / ExportData

Method ExportData

pkg/cmd/project/shared/queries/queries.go:1044–1059  ·  view source on GitHub ↗
(_ []string)

Source from the content-addressed store, hash-verified

1042}
1043
1044func (p ProjectField) ExportData(_ []string) map[string]any {
1045 v := map[string]any{
1046 "id": p.ID(),
1047 "name": p.Name(),
1048 "type": p.Type(),
1049 }
1050 // Emulate omitempty
1051 if opts := p.Options(); len(opts) != 0 {
1052 options := make([]map[string]any, len(opts))
1053 for i, opt := range opts {
1054 options[i] = opt.ExportData(nil)
1055 }
1056 v["options"] = options
1057 }
1058 return v
1059}
1060
1061type ProjectFields struct {
1062 TotalCount int

Calls 5

IDMethod · 0.95
NameMethod · 0.95
TypeMethod · 0.95
OptionsMethod · 0.95
ExportDataMethod · 0.65