mirror of https://github.com/docker/cli.git
appcontext: remove unused parts
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
febb37a38e
commit
112d79a413
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
Loading…
Reference in New Issue