github.com/cilium/cilium@v1.16.2/clustermesh-apiserver/clustermesh-dbg/root.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright Authors of Cilium 3 4 package dbg 5 6 import ( 7 "context" 8 "os" 9 "os/signal" 10 11 "github.com/spf13/cobra" 12 ) 13 14 var RootCmd = func() *cobra.Command { 15 cmd := &cobra.Command{ 16 Use: "clustermesh-dbg", 17 Short: "CLI for interacting with ClusterMesh", 18 19 PersistentPreRun: func(cmd *cobra.Command, args []string) { 20 ctx, _ := signal.NotifyContext(context.Background(), os.Interrupt) 21 cmd.SetContext(ctx) 22 }, 23 } 24 25 return cmd 26 }()