add list config file and relevant config in main config file. other minor changes
Some checks failed
ci/woodpecker/push/go-lint Pipeline failed
Some checks failed
ci/woodpecker/push/go-lint Pipeline failed
This commit is contained in:
14
cmd/list.go
14
cmd/list.go
@ -20,20 +20,30 @@ var (
|
||||
)
|
||||
|
||||
var listsToList []string
|
||||
var cmdsToList []string
|
||||
|
||||
func init() {
|
||||
|
||||
listCmd.Flags().StringSliceVarP(&listsToList, "lists", "l", nil, "Accepts comma-separated names of command lists to list.")
|
||||
listCmd.Flags().StringSliceVarP(&cmdsToList, "cmds", "c", nil, "Accepts comma-separated names of commands to list.")
|
||||
|
||||
}
|
||||
|
||||
func List(cmd *cobra.Command, args []string) {
|
||||
|
||||
opts := backy.NewOpts(cfgFile, backy.SetListsToSearch(cmdLists))
|
||||
// settup based on whats passed in:
|
||||
// - cmds
|
||||
// - lists
|
||||
// - if none, list all commands
|
||||
if cmdLists != nil {
|
||||
|
||||
}
|
||||
|
||||
opts := backy.NewOpts(cfgFile)
|
||||
|
||||
opts.InitConfig()
|
||||
|
||||
opts = backy.ReadConfig(opts)
|
||||
|
||||
opts.ListConfiguration()
|
||||
opts.ListCommand("rm-sn-db")
|
||||
}
|
||||
|
Reference in New Issue
Block a user