INNER CODE UNIT · Go
InspectCommand
kitops-ml/kitops · pkg/cmd/inspect/cmd.go:60
func InspectCommand() *cobra.Command {
opts := &inspectOptions{}
cmd := &cobra.Command{
Use: "inspect [flags] MODELKIT",
Short: shortDesc,
Long: longDesc,
Example: example,
RunE: runCommand(opts),
Args: cobra.ExactArgs(1),
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
if cmd.Flags().Changed("remote") {
return nil, cobra.ShellCompDirectiveNoFileComp
}
if len(args) >= 1 {
return nil, cobra.ShellCompDirectiveNoFileComp
}
return completion.GetLocalModelKitsCompletion(cmd.Context(), toComplete), cobra.ShellCompDirectiveNoFileComp | cobra.ShellCompDirectiveNoSpace