forked from openshift/osdctl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcmd.go
30 lines (26 loc) · 805 Bytes
/
cmd.go
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
package network
import (
"fmt"
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)
// NewCmdNetwork implements the base cluster deployment command
func NewCmdNetwork(streams genericclioptions.IOStreams, flags *genericclioptions.ConfigFlags, client client.Client) *cobra.Command {
netCmd := &cobra.Command{
Use: "network",
Short: "network related utilities",
Args: cobra.NoArgs,
DisableAutoGenTag: true,
}
netCmd.AddCommand(newCmdPacketCapture(streams, flags, client))
netCmd.AddCommand(NewCmdValidateEgress())
return netCmd
}
func help(cmd *cobra.Command, _ []string) {
err := cmd.Help()
if err != nil {
fmt.Println("Error while calling cmd.Help(): ", err.Error())
return
}
}