Skip to content

Commit f4f7f34

Browse files
leodidofntlnz
authored andcommitted
feat(cmd): root command
1 parent 108fe85 commit f4f7f34

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

cmd/root.go

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package main
2+
3+
import (
4+
"os"
5+
6+
"github.com/fntlnz/kubectl-trace/pkg/cmd"
7+
"github.com/spf13/pflag"
8+
"k8s.io/cli-runtime/pkg/genericclioptions"
9+
)
10+
11+
func main() {
12+
flags := pflag.NewFlagSet("kubectl-trace", pflag.ExitOnError)
13+
pflag.CommandLine = flags
14+
15+
streams := genericclioptions.IOStreams{
16+
In: os.Stdin,
17+
Out: os.Stdout,
18+
ErrOut: os.Stderr,
19+
}
20+
root := cmd.NewTraceCommand(streams)
21+
if err := root.Execute(); err != nil {
22+
os.Exit(1)
23+
}
24+
}

0 commit comments

Comments
 (0)