cobratemplate

package
v0.0.0-...-46d4b59 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

* Project: CurveCli * Created Date: 2022-05-09 * Author: chengyi (Cyber-SiKu)

Index

Constants

View Source
const (
	BSNAME          = "bs"
	FSNAME          = "fs"
	Unknown cmdType = iota
	RootCmd
	BsCmd
	FsCmd
)

Variables

View Source
var (
	NoArgs            = cli.NoArgs
	RequiresMinArgs   = cli.RequiresMinArgs
	RequiresMaxArgs   = cli.RequiresMaxArgs
	RequiresRangeArgs = cli.RequiresRangeArgs
	ExactArgs         = cli.ExactArgs

	ShowHelp = command.ShowHelp
)

Functions

func AvailableValueStr

func AvailableValueStr(flag *pflag.Flag, cmdtype cmdType) string

func GetCmdType

func GetCmdType(cmd *cobra.Command) cmdType

return the type of command (bs or fs or root)

func RootCommand

func RootCommand(cmd *cobra.Command) string

func SetFlagErrorFunc

func SetFlagErrorFunc(cmd *cobra.Command)

func SetHelpTemplate

func SetHelpTemplate(cmd *cobra.Command)

func SetUsageTemplate

func SetUsageTemplate(cmd *cobra.Command)

func SetupCompletionCommand

func SetupCompletionCommand(completionCmd *cobra.Command)

Types

This section is empty.

Jump to

Keyboard shortcuts

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