Compatibility for cli.Context and context.Context
ptth404 opened this issue · comments
ptth404 commented
While cli.Context
embeds context.Context
sea time it overrides Context.Value
notation so that thee standard Context
interface isn't implemented
With that calling
var ctx context.Context = // WithValue WithCancel etc
command.Run(context.WithValue(), os.Args)
how is it supposed to access a standard Context interface in any downstream action calls which are injected with *cli.Context
one.
E.g
...
Action(ctx *cli.Context) error {
var stdCtx context.Context = ... // resolve from ctx
net.DialContext(stdCtx, ...)
}