mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
chore: fix some small issues detected by golangci-lint
But not using it as some linters are either plain incorrect (the one suggesting to not use nil for `c.t.Context()`) or just debatable (checking for err value is a good practice, but there are good reasons to opt out in some cases).
This commit is contained in:
@@ -73,10 +73,8 @@ func TestHealthcheckCancelContext(t *testing.T) {
|
||||
return reporter.HealthcheckResult{reporter.HealthcheckOK, "all well"}
|
||||
})
|
||||
r.RegisterHealthcheck("hc2", func(ctx context.Context) reporter.HealthcheckResult {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return reporter.HealthcheckResult{reporter.HealthcheckError, "I am late, sorry"}
|
||||
}
|
||||
<-ctx.Done()
|
||||
return reporter.HealthcheckResult{reporter.HealthcheckError, "I am late, sorry"}
|
||||
})
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
go func() {
|
||||
|
||||
Reference in New Issue
Block a user