ExportData implements cmdutil.exportable for --json output.
(fields []string)
| 184 | |
| 185 | // ExportData implements cmdutil.exportable for --json output. |
| 186 | func (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 | |
| 207 | func searchRun(opts *SearchOptions) error { |
| 208 | httpClient, err := opts.HttpClient() |
nothing calls this directly
no outgoing calls
no test coverage detected