maidn-cli/cmd/root.go

26 lines
465 B
Go

package cmd
import (
"errors"
"fmt"
"os"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "cicd-tool",
Short: "A CLI tool to manage CI/CD setup for applications.",
SilenceErrors: true,
}
// Execute adds all child commands to the root command and sets flags appropriately.
func Execute() {
if err := rootCmd.Execute(); err != nil {
if !errors.Is(err, errE2EChecks) {
fmt.Fprintln(os.Stderr, err)
}
os.Exit(1)
}
}