add 10 day deadline to cli context

This commit is contained in:
ryanfkeepers 2023-03-17 12:32:48 -06:00
parent 91328d9898
commit 0066f0c4ef

View File

@ -5,6 +5,7 @@ import (
"os" "os"
"regexp" "regexp"
"strings" "strings"
"time"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"golang.org/x/exp/slices" "golang.org/x/exp/slices"
@ -147,7 +148,10 @@ func BuildCommandTree(cmd *cobra.Command) {
// Handle builds and executes the cli processor. // Handle builds and executes the cli processor.
func Handle() { func Handle() {
//nolint:forbidigo //nolint:forbidigo
ctx := config.Seed(context.Background()) ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(time.Hour*24*10))
defer cancel()
ctx = config.Seed(ctx)
ctx = print.SetRootCmd(ctx, corsoCmd) ctx = print.SetRootCmd(ctx, corsoCmd)
observe.SeedWriter(ctx, print.StderrWriter(ctx), observe.PreloadFlags()) observe.SeedWriter(ctx, print.StderrWriter(ctx), observe.PreloadFlags())