// NewTraceCommand creates the trace command and its nested children.
NewTraceCommand creates the trace command and its nested children.
// NewTraceCommand creates the trace command and its nested children .
func NewTraceCommand(streams genericclioptions.IOStreams) *cobra.Command {
	o := NewTraceOptions(streams)
	cmd := &cobra.Command{
		Use:                   "trace",
		DisableFlagsInUseLine: true,
		Short:                 `Execute and manage bpftrace programs`, 
		Long:                  traceLong,                              
		Example:               fmt.Sprintf(traceExamples, "kubectl"),  
		Run: func(c *cobra.Command, args []string) {
			c.SetOutput(streams.ErrOut)
			cobra.NoArgs(c, args)
			c.Help()
		},
	}
	flags := cmd.PersistentFlags()
	o.configFlags.AddFlags(flags)
	matchVersionFlags := factory.NewMatchVersionFlags(o.configFlags)
	matchVersionFlags.AddFlags(flags)
	f := factory.NewFactory(matchVersionFlags)
	cmd.AddCommand(NewRunCommand(f, streams))
	cmd.AddCommand(NewGetCommand(f, streams))
	cmd.AddCommand(NewAttachCommand(f, streams))
	cmd.AddCommand(NewDeleteCommand(f, streams))
	cmd.AddCommand(NewVersionCommand(streams))
	cmd.AddCommand(NewLogCommand(f, streams))
	walk(cmd, func(c *cobra.Command) {
		c.Flags().BoolP("help", "h", false, fmt.Sprintf("Help for the %s command", c.Name()))
	})
	return cmd
}
func NewTraceCommand ( streams genericclioptions . IOStreams ) * cobra . Command { o := NewTraceOptions ( streams ) cmd := & cobra . Command { Use : " " , DisableFlagsInUseLine : true , Short : `Execute and manage bpftrace programs` , Long : traceLong , Example : fmt . Sprintf ( traceExamples , " " ) , Run : func ( c * cobra . Command , args [ ] string ) { c . SetOutput ( streams . ErrOut ) cobra . NoArgs ( c , args ) c . Help ( ) } , } flags := cmd . PersistentFlags ( ) o . configFlags . AddFlags ( flags ) matchVersionFlags := factory . NewMatchVersionFlags ( o . configFlags ) matchVersionFlags . AddFlags ( flags ) f := factory . NewFactory ( matchVersionFlags ) cmd . AddCommand ( NewRunCommand ( f , streams ) ) cmd . AddCommand ( NewGetCommand ( f , streams ) ) cmd . AddCommand ( NewAttachCommand ( f , streams ) ) cmd . AddCommand ( NewDeleteCommand ( f , streams ) ) cmd . AddCommand ( NewVersionCommand ( streams ) ) cmd . AddCommand ( NewLogCommand ( f , streams ) ) walk ( cmd , func ( c * cobra . Command ) { c . Flags ( ) . BoolP ( " " , " " , false , fmt . Sprintf ( " " , c . Name ( ) ) ) } ) return cmd }
NewTraceCommand creates the trace command and its nested children.
NewTraceCommand creates the trace command and its nested children .
// Wrap with i18n.T() // Wrap with templates.LongDesc() // Wrap with templates.Examples() // flags.AddGoFlagSet(flag.CommandLine) // todo(leodido) > evaluate whether we need this or not // Override help on all the commands tree