(_ string)
| 432 | } |
| 433 | |
| 434 | func getCertificationTargets(_ string) []string { |
| 435 | var ( |
| 436 | err error |
| 437 | session *Session |
| 438 | client orchestrator.OrchestratorClient |
| 439 | res *orchestrator.ListCertificationTargetsResponse |
| 440 | ) |
| 441 | |
| 442 | if session, err = ContinueSession(); err != nil { |
| 443 | fmt.Printf("Error while retrieving the session. Please re-authenticate.\n") |
| 444 | return nil |
| 445 | } |
| 446 | |
| 447 | client = orchestrator.NewOrchestratorClient(session) |
| 448 | |
| 449 | if res, err = client.ListCertificationTargets(context.Background(), &orchestrator.ListCertificationTargetsRequest{}); err != nil { |
| 450 | return []string{} |
| 451 | } |
| 452 | |
| 453 | var metrics []string |
| 454 | for _, v := range res.Targets { |
| 455 | metrics = append(metrics, fmt.Sprintf("%s\t%s: %s", v.Id, v.Name, v.Description)) |
| 456 | } |
| 457 | |
| 458 | return metrics |
| 459 | } |
no test coverage detected