Skip to content

Commit

Permalink
chore(cmd): typos and little improv
Browse files Browse the repository at this point in the history
  • Loading branch information
leodido authored and fntlnz committed Feb 7, 2019
1 parent e29e247 commit 6c4c743
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/cmd/attach.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func (o *AttachOptions) Validate(cmd *cobra.Command, args []string) error {
return nil
}

// Complete completes the setup of the command.
func (o *AttachOptions) Complete(factory factory.Factory, cmd *cobra.Command, args []string) error {
// Prepare namespace
var err error
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ func (o *DeleteOptions) Validate(cmd *cobra.Command, args []string) error {
return nil
}

// Complete completes the setup of the command.
func (o *DeleteOptions) Complete(factory factory.Factory, cmd *cobra.Command, args []string) error {
// Prepare namespace
var err error
Expand Down
2 changes: 2 additions & 0 deletions pkg/cmd/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func NewLogCommand(factory factory.Factory, streams genericclioptions.IOStreams)
return cmd
}

// Validate validates the arguments and flags populating LogOptions accordingly.
func (o *LogOptions) Validate(cmd *cobra.Command, args []string) error {
if meta.IsObjectName(args[0]) {
o.traceName = &args[0]
Expand All @@ -96,6 +97,7 @@ func (o *LogOptions) Validate(cmd *cobra.Command, args []string) error {
return nil
}

// Complete completes the setup of the command.
func (o *LogOptions) Complete(factory factory.Factory, cmd *cobra.Command, args []string) error {
// Prepare namespace
var err error
Expand Down
3 changes: 2 additions & 1 deletion pkg/cmd/tracerunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func NewTraceRunnerCommand() *cobra.Command {
cmd.Flags().StringVarP(&o.podUID, "poduid", "p", o.podUID, "Specify the pod UID")
cmd.Flags().StringVarP(&o.programPath, "program", "f", "program.bt", "Specify the bpftrace program path")
cmd.Flags().StringVarP(&o.bpftraceBinaryPath, "bpftracebinary", "b", "/bin/bpftrace", "Specify the bpftrace binary path")
cmd.Flags().BoolVar(&o.inPod, "inpod", false, "Wether or not run this bpftrace in a pod's container process namespace")
cmd.Flags().BoolVar(&o.inPod, "inpod", false, "Wheter or not run this bpftrace in a pod's container process namespace")
return cmd
}

Expand All @@ -62,6 +62,7 @@ func (o *TraceRunnerOptions) Validate(cmd *cobra.Command, args []string) error {
return nil
}

// Complete completes the setup of the command.
func (o *TraceRunnerOptions) Complete(cmd *cobra.Command, args []string) error {
return nil
}
Expand Down

0 comments on commit 6c4c743

Please sign in to comment.