MCPcopy
hub / github.com/cli/cli / ExportData

Method ExportData

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

Source from the content-addressed store, hash-verified

998}
999
1000func (p ProjectField) ExportData(_ []string) map[string]interface{} {
1001 v := map[string]interface{}{
1002 "id": p.ID(),
1003 "name": p.Name(),
1004 "type": p.Type(),
1005 }
1006 // Emulate omitempty
1007 if opts := p.Options(); len(opts) != 0 {
1008 options := make([]map[string]interface{}, len(opts))
1009 for i, opt := range opts {
1010 options[i] = opt.ExportData(nil)
1011 }
1012 v["options"] = options
1013 }
1014 return v
1015}
1016
1017type ProjectFields struct {
1018 TotalCount int

Calls 5

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