Add more tests, refactor to fix problems

Signed-off-by: Patrice Ferlet <metal3d@gmail.com>
This commit is contained in:
2024-04-24 20:55:27 +02:00
parent 15a2f25e51
commit da7d92bbfa
8 changed files with 429 additions and 20 deletions

View File

@@ -22,7 +22,11 @@ Each [command] and subcommand has got an "help" and "--help" flag to show more i
`
func main() {
// The base command
rootCmd := buildRootCmd()
rootCmd.Execute()
}
func buildRootCmd() *cobra.Command {
rootCmd := &cobra.Command{
Use: "katenary",
Long: longHelp,
@@ -42,7 +46,7 @@ func main() {
generateLabelHelpCommand(),
)
rootCmd.Execute()
return rootCmd
}
const completionHelp = `To load completions: