(_ string)
| 295 | } |
| 296 | |
| 297 | func getTools(_ string) []string { |
| 298 | var ( |
| 299 | err error |
| 300 | session *Session |
| 301 | client orchestrator.OrchestratorClient |
| 302 | res *orchestrator.ListAssessmentToolsResponse |
| 303 | ) |
| 304 | |
| 305 | if session, err = ContinueSession(); err != nil { |
| 306 | fmt.Printf("Error while retrieving the session. Please re-authenticate.\n") |
| 307 | return nil |
| 308 | } |
| 309 | |
| 310 | client = orchestrator.NewOrchestratorClient(session) |
| 311 | |
| 312 | if res, err = client.ListAssessmentTools(context.Background(), &orchestrator.ListAssessmentToolsRequest{}); err != nil { |
| 313 | return []string{} |
| 314 | } |
| 315 | |
| 316 | var tools []string |
| 317 | for _, v := range res.Tools { |
| 318 | tools = append(tools, fmt.Sprintf("%s\t%s: %s", v.Id, v.Name, v.Description)) |
| 319 | } |
| 320 | |
| 321 | return tools |
| 322 | } |
| 323 | |
| 324 | // TODO(oxisto): This could be an interesting use case for 1.18 Go generics |
| 325 | func getMetrics(_ string) []string { |
no test coverage detected