From c7d282ce0c4bc5a68abe2a8e45b8ebe0a24be3fc Mon Sep 17 00:00:00 2001 From: Keepers Date: Tue, 21 Mar 2023 08:51:57 -0600 Subject: [PATCH] cli: use withTimeout, not withDeadline (#2865) #### Type of change - [x] :broom: Tech Debt/Cleanup --- src/cli/cli.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cli/cli.go b/src/cli/cli.go index 8b8cf3b57..b0626910a 100644 --- a/src/cli/cli.go +++ b/src/cli/cli.go @@ -147,9 +147,8 @@ func BuildCommandTree(cmd *cobra.Command) { // Handle builds and executes the cli processor. func Handle() { - tenDays := time.Now().Add(time.Hour * 24 * 10) //nolint:forbidigo - ctx, cancel := context.WithDeadline(context.Background(), tenDays) + ctx, cancel := context.WithTimeout(context.Background(), time.Hour*24*10) defer cancel() ctx = config.Seed(ctx)