cli

package
v0.0.0-...-be384fd Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HomeFlag   = "home"
	TraceFlag  = "trace"
	OutputFlag = "output" // used in the cli
)

Variables

This section is empty.

Functions

func BindFlagsLoadViper

func BindFlagsLoadViper(cmd *cobra.Command, _args []string) error

Bind all flags and read the config into viper

func InitEnv

func InitEnv(prefix string)

InitEnv sets to use ENV variables if set.

func PrepareBaseCmd

func PrepareBaseCmd(cmd *cobra.Command, envPrefix, defaultHome string) *cobra.Command

PrepareBaseCmd is meant for tendermint and other servers

func RunWithArgs

func RunWithArgs(ctx context.Context, cmd *cobra.Command, args []string, env map[string]string) error

RunWithArgs executes the given command with the specified command line args and environmental variables set. It returns any error returned from cmd.Execute()

This is only used in testing.

func RunWithTrace

func RunWithTrace(ctx context.Context, cmd *cobra.Command) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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