Skip to content

Commit 6ef185a

Browse files
authored
style(lint): fix line length check (#1311)
Signed-off-by: Salim Afiune Maya <[email protected]>
1 parent f73932f commit 6ef185a

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

api/entities_machines.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,11 @@ func (svc *EntitiesService) ListAllMachines() (response MachinesEntityResponse,
6969
return
7070
}
7171

72-
// ListAllMachinesWithFilters iterates over all pages to return all machine details at once based on a user defined filter
73-
func (svc *EntitiesService) ListAllMachinesWithFilters(filters SearchFilter) (response MachinesEntityResponse, err error) {
72+
// ListAllMachinesWithFilters iterates over all pages to return all machine details
73+
// at once based on a user defined filter
74+
func (svc *EntitiesService) ListAllMachinesWithFilters(filters SearchFilter) (
75+
response MachinesEntityResponse, err error,
76+
) {
7477
response, err = svc.ListMachinesWithFilters(filters)
7578
if err != nil {
7679
return

cli/cmd/vuln_host_show_assessment.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,13 @@ Grab a CVE id and feed it to the command:
6060
}
6161

6262
// validate collector_type flag
63-
if vulCmdState.CollectorType != vulnHostCollectorTypeAgentless && vulCmdState.CollectorType != vulnHostCollectorTypeAgent {
64-
return errors.Errorf("collector_type must be either %s or %s", vulnHostCollectorTypeAgent, vulnHostCollectorTypeAgentless)
63+
switch vulCmdState.CollectorType {
64+
case vulnHostCollectorTypeAgentless, vulnHostCollectorTypeAgent:
65+
default:
66+
return errors.Errorf(
67+
"collector_type must be either %s or %s",
68+
vulnHostCollectorTypeAgent, vulnHostCollectorTypeAgentless,
69+
)
6570
}
6671

6772
if vulCmdState.CollectorType == vulnHostCollectorTypeAgentless {

0 commit comments

Comments
 (0)