kli

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DocsCmd = &cobra.Command{
	Hidden: true,
	Use:    "docs",
	Short:  "generate docs for kloudlite cli",
	Long: `This command let you generate docs for kloudlite cli.

Example:
  # generate docs for kloudlite cli
  kl docs

  when you execute the above command a link will be opened on your browser. 
  visit your browser and approve there to access your account using this cli.
	`,
	Run: func(_ *cobra.Command, args []string) {
		if err := runDocGen(rootCmd, args); err != nil {
			common_util.PrintError(err)
			return
		}

		common_util.Log("successfully generated docs")
	},
}
View Source
var UpdateCmd = &cobra.Command{
	Hidden: true,
	Use:    "update",
	Short:  "Update the kl to latest version",
	Long: `Update the kl to latest version
Example:
# Update the kl to latest version
kl update
`,
	Run: func(cmd *cobra.Command, _ []string) {
		version := ""

		if cmd.Flags().Changed("version") {
			version, _ = cmd.Flags().GetString("version")
			version = fmt.Sprintf("@%s", version)
		}
		err := ExecUpdateCmd(version)
		if err != nil {
			fn.Log(err)
			return
		}
		fn.Log("successfully updated")
	},
}

Functions

func ExecUpdateCmd

func ExecUpdateCmd(version string) error

func Execute

func Execute()

func GetRootHelp

func GetRootHelp(cmd *cobra.Command) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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