root.go 692 B

123456789101112131415161718192021222324
  1. package cmd
  2. import (
  3. "fmt"
  4. "os"
  5. "github.com/spf13/cobra"
  6. )
  7. // rootCmd represents the base command when called without any subcommands
  8. var rootCmd = &cobra.Command{
  9. Use: "porter",
  10. Short: "Porter is a dashboard for managing Kubernetes clusters.",
  11. Long: `Porter is a tool for creating, versioning, and updating Kubernetes deployments using a visual dashboard. For more information, visit github.com/porter-dev/porter`,
  12. }
  13. // Execute adds all child commands to the root command and sets flags appropriately.
  14. // This is called by main.main(). It only needs to happen once to the rootCmd.
  15. func Execute() {
  16. if err := rootCmd.Execute(); err != nil {
  17. fmt.Println(err)
  18. os.Exit(1)
  19. }
  20. }