common

package
v0.0.0-...-86c6960 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CompletionCmd = &cobra.Command{
	Use:       "completion bash|zsh",
	Short:     completionShort,
	Long:      completionLong,
	Example:   completionExample,
	ValidArgs: []string{"bash", "zsh"},
	Args:      cobra.ExactValidArgs(1),
	Run: func(cmd *cobra.Command, args []string) {
		var err error
		switch args[0] {
		case "bash":
			err = cmd.Root().GenBashCompletionV2(os.Stdout, true)
		case "zsh":
			err = cmd.Root().GenZshCompletion(os.Stdout)
		}

		tracelog.ErrorLogger.FatalOnError(err)
	},
}

CompletionCmd represents the completion command

View Source
var FlagsCmd = &cobra.Command{
	Use:                   "flags",
	Short:                 "Display the list of available global flags for all wal-g commands",
	DisableFlagsInUseLine: true,
	Run: func(cmd *cobra.Command, args []string) {
		_ = cmd.Usage()
	},
}

FlagsCmd represents the flags command

Functions

func Init

func Init(cmd *cobra.Command, dbName string)

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