mirror of https://github.com/coder/coder.git
Fix linting issues
This commit is contained in:
parent
2e30fa4e78
commit
89d50a7a85
|
@ -905,9 +905,8 @@ func medianFloat64s(a []float64) float64 {
|
|||
return a[0]
|
||||
} else if len(a)%2 == 0 {
|
||||
return (a[len(a)/2-1] + a[len(a)/2]) / 2
|
||||
} else {
|
||||
return a[len(a)/2]
|
||||
}
|
||||
return a[len(a)/2]
|
||||
}
|
||||
|
||||
func (*FakeQuerier) AcquireLock(_ context.Context, _ int64) error {
|
||||
|
@ -2515,7 +2514,7 @@ func (q *FakeQuerier) GetIntelMachinesMatchingFilters(_ context.Context, arg dat
|
|||
return machines, nil
|
||||
}
|
||||
|
||||
func (q *FakeQuerier) GetIntelReportCommands(ctx context.Context, arg database.GetIntelReportCommandsParams) ([]database.GetIntelReportCommandsRow, error) {
|
||||
func (q *FakeQuerier) GetIntelReportCommands(_ context.Context, arg database.GetIntelReportCommandsParams) ([]database.GetIntelReportCommandsRow, error) {
|
||||
err := validateDatabaseType(arg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -2607,7 +2606,7 @@ func (q *FakeQuerier) GetIntelReportGitRemotes(_ context.Context, opts database.
|
|||
}
|
||||
}
|
||||
remote.TotalInvocations += int64(invocations)
|
||||
remoteMedianDurations[key] = append(remoteMedianDurations[key], float64(summary.MedianDurationMs))
|
||||
remoteMedianDurations[key] = append(remoteMedianDurations[key], summary.MedianDurationMs)
|
||||
remotes[key] = remote
|
||||
}
|
||||
}
|
||||
|
@ -8516,6 +8515,7 @@ func (q *FakeQuerier) UpsertIntelCohort(_ context.Context, arg database.UpsertIn
|
|||
return cohort, nil
|
||||
}
|
||||
|
||||
//nolint:gosimple
|
||||
cohort := database.IntelCohort{
|
||||
ID: arg.ID,
|
||||
OrganizationID: arg.OrganizationID,
|
||||
|
|
Loading…
Reference in New Issue