-
Notifications
You must be signed in to change notification settings - Fork 179
Expand file tree
/
Copy pathroot.go
More file actions
31 lines (25 loc) · 767 Bytes
/
root.go
File metadata and controls
31 lines (25 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// SPDX-FileCopyrightText: the secureCodeBox authors
//
// SPDX-License-Identifier: Apache-2.0
package cmd
import (
kubernetes "github.com/secureCodeBox/secureCodeBox/scbctl/pkg"
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
)
var kubeconfigArgs = genericclioptions.NewConfigFlags(false)
var (
clientProvider kubernetes.ClientProvider = &kubernetes.DefaultClientProvider{}
)
func NewRootCommand() *cobra.Command {
rootCmd := &cobra.Command{
Use: "scbctl",
Short: "cli app to manage scans & other secureCodeBox resources",
Long: ``,
}
kubeconfigArgs.AddFlags(rootCmd.PersistentFlags())
rootCmd.AddCommand(NewScanCommand())
rootCmd.AddCommand(NewTriggerCommand())
rootCmd.AddCommand(NewCascadeCommand())
return rootCmd
}