v2: housekeeping: address minor lint complaints (#2957)

* v2: housekeeping: update tools

* v2: housekeeping: adhere to US locale in spelling

* v2: housekeeping: simplify code
This commit is contained in:
Mohammed Al Sahaf
2020-01-03 21:33:22 +03:00
committed by Matt Holt
parent 8c7c2e4af2
commit dff78d82ce
9 changed files with 12 additions and 15 deletions

View File

@ -30,7 +30,7 @@ import (
// that spawned the modules which are loaded. It should be used
// with care and wrapped with derivation functions from the
// standard context package only if you don't need the Caddy
// specific features. These contexts are cancelled when the
// specific features. These contexts are canceled when the
// lifetime of the modules loaded from it is over.
//
// Use NewContext() to get a valid value (but most modules will
@ -75,7 +75,7 @@ func NewContext(ctx Context) (Context, context.CancelFunc) {
return newCtx, wrappedCancel
}
// OnCancel executes f when ctx is cancelled.
// OnCancel executes f when ctx is canceled.
func (ctx *Context) OnCancel(f func()) {
ctx.cleanupFuncs = append(ctx.cleanupFuncs, f)
}