tools

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: BSD-3-Clause-LBNL Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthCmd = &cobra.Command{
	Use:   "auth",
	Short: "Manage auth via API",
	Long:  `Provides some utility to help the user manage their auth keys`,
}

userCmd represents the version command

View Source
var CompletionCmd = &cobra.Command{
	Use:                   "completion [bash|zsh|fish|powershell]",
	Short:                 "Generate completion script",
	Long:                  "To load completions",
	DisableFlagsInUseLine: true,
	ValidArgs:             []string{"bash", "zsh", "fish", "powershell"},
	Args:                  cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
	Run: func(command *cobra.Command, args []string) {
		var err error
		switch args[0] {
		case "bash":
			err = cmd.RootCmd.GenBashCompletion(os.Stdout)
		case "zsh":
			err = cmd.RootCmd.GenZshCompletion(os.Stdout)
		case "fish":
			err = cmd.RootCmd.GenFishCompletion(os.Stdout, true)
		case "powershell":
			err = cmd.RootCmd.GenPowerShellCompletion(os.Stdout)
		}
		if err != nil {
			log.Error("Failed to generation shell completion.")
		}
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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