(ctx context.Context, zw *zip.Writer, hub *cwhub.Hub)
| 282 | } |
| 283 | |
| 284 | func (cli *cliSupport) dumpLAPIStatus(ctx context.Context, zw *zip.Writer, hub *cwhub.Hub) error { |
| 285 | if hub == nil { |
| 286 | return errors.New("hub is nil") |
| 287 | } |
| 288 | |
| 289 | fmt.Fprintln(os.Stdout, "Collecting LAPI status") |
| 290 | |
| 291 | out := new(bytes.Buffer) |
| 292 | cl := clilapi.New(cli.cfg) |
| 293 | |
| 294 | err := cl.Status(ctx, out, hub) |
| 295 | if err != nil { |
| 296 | fmt.Fprintf(out, "%s\n", err) |
| 297 | } |
| 298 | |
| 299 | stripped := stripAnsiString(out.String()) |
| 300 | |
| 301 | cli.writeToZip(zw, SUPPORT_LAPI_STATUS_PATH, time.Now(), strings.NewReader(stripped)) |
| 302 | |
| 303 | return nil |
| 304 | } |
| 305 | |
| 306 | func (cli *cliSupport) dumpCAPIStatus(ctx context.Context, zw *zip.Writer, hub *cwhub.Hub, db *database.Client) error { |
| 307 | if hub == nil { |
no test coverage detected