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

Method ExportData

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

Source from the content-addressed store, hash-verified

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

Calls 5

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