add list config file and relevant config in main config file. other minor changes
Some checks failed
ci/woodpecker/push/go-lint Pipeline failed

This commit is contained in:
2024-08-28 15:06:25 -05:00
parent 8161aaa0a9
commit a300f696d3
14 changed files with 321 additions and 203 deletions

View File

@ -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")
}