(name string, action string, record SkillActionRecord)
| 283 | } |
| 284 | |
| 285 | func skillActionBundle(name string, action string, record SkillActionRecord) outputBundle { |
| 286 | item := struct { |
| 287 | Name string `json:"name"` |
| 288 | Action string `json:"action"` |
| 289 | OK bool `json:"ok"` |
| 290 | }{ |
| 291 | Name: name, |
| 292 | Action: action, |
| 293 | OK: record.OK, |
| 294 | } |
| 295 | return outputBundle{ |
| 296 | jsonValue: item, |
| 297 | human: func() (string, error) { |
| 298 | return renderHumanSection("Skill Action", []keyValue{ |
| 299 | {Label: automationNameValue, Value: stringOrDash(item.Name)}, |
| 300 | {Label: skillOutputActionValue, Value: stringOrDash(item.Action)}, |
| 301 | {Label: "OK", Value: strconv.FormatBool(item.OK)}, |
| 302 | }), nil |
| 303 | }, |
| 304 | toon: func() (string, error) { |
| 305 | return renderToonObject("skill_action", []string{automationNameKey, skillOutputActionKey, "ok"}, []string{ |
| 306 | item.Name, |
| 307 | item.Action, |
| 308 | strconv.FormatBool(item.OK), |
| 309 | }), nil |
| 310 | }, |
| 311 | } |
| 312 | } |
| 313 | |
| 314 | func skillInstallBundle(item skillInstallItem) outputBundle { |
| 315 | return outputBundle{ |
no test coverage detected