remove list subcommand

This commit is contained in:
Puskar Basu
2024-09-11 16:21:56 +05:30
parent e5b1927a63
commit f72f0165db
2 changed files with 0 additions and 51 deletions

View File

@@ -1,49 +0,0 @@
package cmd
import (
"fmt"
"github.com/spf13/cobra"
"github.com/turbot/steampipe/pkg/cmdconfig"
)
// TODO #kai can we just remove this
type listSubCmdOptions struct {
parentCmd *cobra.Command
}
func getListSubCmd(opts listSubCmdOptions) *cobra.Command {
cmd := &cobra.Command{
Use: "list",
TraverseChildren: true,
Args: cobra.NoArgs,
Run: getRunListSubCmd(opts),
Short: fmt.Sprintf("List all resources that can be executed with the '%s' command", opts.parentCmd.Name()),
Long: fmt.Sprintf("List all resources that can be executed with the '%s' command", opts.parentCmd.Name()),
}
cmdconfig.
OnCmd(cmd)
return cmd
}
// getRunListSubCmd generates a command handler based on the parent command
func getRunListSubCmd(opts listSubCmdOptions) func(cmd *cobra.Command, args []string) {
if opts.parentCmd == nil {
// this should never happen
panic("parent is required")
}
return func(cmd *cobra.Command, _ []string) {
// TODO #v1 list query files? or deprecate list commena
//ctx := cmd.Context()
//
//headers, rows := getOutputDataTable(modResources, depResources)
//
//display.ShowWrappedTable(headers, rows, &display.ShowWrappedTableOptions{
// AutoMerge: false,
// HideEmptyColumns: true,
// Truncate: true,
//})
}
}

View File

@@ -89,8 +89,6 @@ Examples:
AddStringFlag(pconstants.ArgSnapshotLocation, "", "The location to write snapshots - either a local file path or a Turbot Pipes workspace").
AddBoolFlag(pconstants.ArgProgress, true, "Display snapshot upload status")
cmd.AddCommand(getListSubCmd(listSubCmdOptions{parentCmd: cmd}))
return cmd
}