From a8c90b3858155b01d49a3e3636dcefb3e6fb3df3 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 20 Jul 2023 16:44:32 +0200 Subject: [PATCH] appcontext: remove unused parts Signed-off-by: Sebastiaan van Stijn --- cmd/docker/internal/appcontext/appcontext.go | 4 ---- cmd/docker/internal/appcontext/register.go | 14 -------------- 2 files changed, 18 deletions(-) delete mode 100644 cmd/docker/internal/appcontext/register.go diff --git a/cmd/docker/internal/appcontext/appcontext.go b/cmd/docker/internal/appcontext/appcontext.go index 83809e623a1f..f41f4b6d7508 100644 --- a/cmd/docker/internal/appcontext/appcontext.go +++ b/cmd/docker/internal/appcontext/appcontext.go @@ -25,10 +25,6 @@ func Context() context.Context { retries := 0 ctx := context.Background() - for _, f := range inits { - ctx = f(ctx) - } - ctx, cancel := context.WithCancel(ctx) appContextCache = ctx diff --git a/cmd/docker/internal/appcontext/register.go b/cmd/docker/internal/appcontext/register.go deleted file mode 100644 index 22f9e836520d..000000000000 --- a/cmd/docker/internal/appcontext/register.go +++ /dev/null @@ -1,14 +0,0 @@ -package appcontext - -import ( - "context" -) - -type Initializer func(context.Context) context.Context - -var inits []Initializer - -// Register stores a new context initializer that runs on app context creation -func Register(f Initializer) { - inits = append(inits, f) -}