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

Method ExportData

pkg/cmd/skills/search/search.go:186–205  ·  view source on GitHub ↗

ExportData implements cmdutil.exportable for --json output.

(fields []string)

Source from the content-addressed store, hash-verified

184
185// ExportData implements cmdutil.exportable for --json output.
186func (s skillResult) ExportData(fields []string) map[string]any {
187 data := map[string]any{}
188 for _, f := range fields {
189 switch f {
190 case "repo":
191 data[f] = s.Repo
192 case "skillName":
193 data[f] = s.SkillName
194 case "namespace":
195 data[f] = s.Namespace
196 case "description":
197 data[f] = s.Description
198 case "stars":
199 data[f] = s.Stars
200 case "path":
201 data[f] = s.Path
202 }
203 }
204 return data
205}
206
207func searchRun(opts *SearchOptions) error {
208 httpClient, err := opts.HttpClient()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected