cmd

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   string
	Commit    string
	Branch    string
	BuildTime string
)
View Source
var RootCmd = &cobra.Command{
	Use:   "gemix",
	Short: "One-click deployment and upgrade tool for openGemini",
	Long: `Gemix is a command-line component management tool that can help to download and install
	openGemini platform components to the local system. You can run a specific version via
	"gemix install <component>[:version]". If no version number is specified, the latest version installed
	locally will be used. If the specified component does not have any version installed locally,
	the latest stable version will be downloaded from the repository.`,
	SilenceErrors:      true,
	SilenceUsage:       true,
	DisableFlagParsing: true,
	Args: func(cmd *cobra.Command, args []string) error {

		return nil
	},
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) error {
		if len(args) == 0 {
			return cmd.Help()
		}
		switch args[0] {
		case "--help", "-h":
			return cmd.Help()
		case "--version", "-v":
			versionCmd.Run(cmd, nil)
			return nil
		default:
			return cmd.Help()
		}
	},
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL