mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-25 20:29:59 +08:00
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:

committed by
Matt Holt

parent
8c7c2e4af2
commit
dff78d82ce
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user