cmd

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindEnvs

func BindEnvs(envMap map[string]string, cmdName string) (err error)

BindEnvs calls viper.BindEnv with envMap and cmdName which can be empty if flag is general.

func DryRun

func DryRun() bool

DryRun returns a value of a dry run flag. That's a helper function to extend this CLI with own commands and offering same base commands as this CLI.

func Execute

func Execute()

Execute root

func FlagInfo

func FlagInfo(info, cmdPrefix, envName string) string

func RootCmd

func RootCmd() *cobra.Command

RootCmd returns a current root command which can be used for adding own commands in an own repo.

implCmd.AddCommand(listCmd)

That's a helper function to extend this CLI with own commands and offering same base commands as this CLI.

func ServiceAddr

func ServiceAddr() string

func SubCmdNeeded

func SubCmdNeeded(cmd *cobra.Command)

SubCmdNeeded prints the help and error messages because the cmd is abstract.

Types

type ClientFlags

type ClientFlags struct {
	WalletName string
	WalletKey  string
	URL        string
}

ClientFlags agent flags

type RootFlags

type RootFlags struct {
	ServiceAddr string
	// contains filtered or unexported fields
}

RootFlags are the common flags

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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