Skip to content

Commit

Permalink
Change function name podCandidates to validArgsCompletionFunc
Browse files Browse the repository at this point in the history
Signed-off-by: zeroalphat <taichi-takemura@cybozu.co.jp>
  • Loading branch information
zeroalphat committed Oct 25, 2023
1 parent 2489fa3 commit e1891e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/necoperf-cli/cmd/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
k8sConfig "sigs.k8s.io/controller-runtime/pkg/client/config"
)

func podCandidates(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
func validArgsCompletionFunc(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
if len(args) != 0 {
return nil, cobra.ShellCompDirectiveNoFileComp
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/necoperf-cli/cmd/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func NewProfileCommand() *cobra.Command {
Short: "Perform CPU profiling on the target container",
Long: "Perform CPU profiling on the target container",
Args: cobra.ExactArgs(1),
ValidArgsFunction: podCandidates,
ValidArgsFunction: validArgsCompletionFunc,
RunE: func(cmd *cobra.Command, args []string) error {
cmd.SilenceUsage = true
config.podName = args[0]
Expand Down

0 comments on commit e1891e6

Please sign in to comment.