context: replace newAfterFuncContext with a global declaration using blank identifier

newAfterFuncContext has never been used, the only reason I can imagine
for its existence is to guarantee that the implementation is correct.

It is a small cleanup and make code more idiomatic.

Change-Id: Ib62bd3f9f546aabe4ea5de06fdf3e6218b6d555c
This commit is contained in:
Jes Cok 2025-02-20 22:33:13 +08:00
parent b9630c56db
commit c08bd69ef3
1 changed files with 1 additions and 3 deletions

View File

@ -20,9 +20,7 @@ type afterFuncContext struct {
err error
}
func newAfterFuncContext() context.Context {
return &afterFuncContext{}
}
var _ context.Context = (*afterFuncContext)(nil)
func (c *afterFuncContext) Deadline() (time.Time, bool) {
return time.Time{}, false