Merge pull request #10557 from tariq1890/cli-ctx-add

use ctx object from cliContext instead of a creating a new one
This commit is contained in:
Fu Wei
2024-08-13 01:13:48 +00:00
committed by GitHub
4 changed files with 7 additions and 6 deletions

View File

@@ -35,7 +35,7 @@ import (
// defined.
func AppContext(cliContext *cli.Context) (context.Context, context.CancelFunc) {
var (
ctx = context.Background()
ctx = cliContext.Context
timeout = cliContext.Duration("timeout")
namespace = cliContext.String("namespace")
cancel context.CancelFunc