From c08bd69ef3f0dbc2f573f54095fea35dad2b1145 Mon Sep 17 00:00:00 2001 From: Jes Cok Date: Thu, 20 Feb 2025 22:33:13 +0800 Subject: [PATCH] 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 --- src/context/afterfunc_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/context/afterfunc_test.go b/src/context/afterfunc_test.go index 7b75295eb4..c2ef1062d3 100644 --- a/src/context/afterfunc_test.go +++ b/src/context/afterfunc_test.go @@ -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