Skip to content

Commit

Permalink
always set health context to TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarkhas committed May 25, 2021
1 parent 2143a4c commit 04fc5d0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions health.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,14 @@ type Health interface {
// New returns a new Health instance.
func New(opts ...HealthOption) Health {
h := &health{
ctx: context.TODO(),
results: make(map[string]Result, maxExpectedChecks),
checkTasks: make(map[string]checkTask, maxExpectedChecks),
}
for _, opt := range append(opts, WithDefaults()) {
opt.apply(h)
}

if h.ctx == nil {
h.ctx = context.TODO()
}

return h
}

Expand Down

0 comments on commit 04fc5d0

Please sign in to comment.