Files
charts/clustertool/cmd/adv_testcmd.go

36 lines
975 B
Go

package cmd
import (
"strings"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/truecharts/public/clustertool/pkg/gencmd"
"github.com/truecharts/public/clustertool/pkg/initfiles"
"github.com/truecharts/public/clustertool/pkg/talassist"
)
var advTestCmdlongHelp = strings.TrimSpace(`
This command is mostly just for development usage and should NEVER be used by end-users.
`)
var testcmd = &cobra.Command{
Use: "test",
Short: "tests specific code for developer usages",
Long: advTestCmdlongHelp,
Run: func(cmd *cobra.Command, args []string) {
initfiles.LoadTalEnv(false)
talassist.LoadTalConfig()
// err := fluxhandler.ProcessJSONFiles("./testdata/truenas_exports")
// if err != nil {
// log.Info().Msg("Error:", err)
// }
cmds := gencmd.GenApply("", []string{})
log.Info().Msgf("%s", cmds[0])
},
}
func init() {
adv.AddCommand(testcmd)
}