Documentation ¶
Index ¶
- Constants
- func BindFlagsLoadViper(cmd *cobra.Command, _args []string) error
- func InitEnv(prefix string)
- func PrepareBaseCmd(cmd *cobra.Command, envPrefix, defaultHome string) *cobra.Command
- func RunWithArgs(ctx context.Context, cmd *cobra.Command, args []string, env map[string]string) error
- func RunWithTrace(ctx context.Context, cmd *cobra.Command) error
Constants ¶
View Source
const ( HomeFlag = "home" TraceFlag = "trace" OutputFlag = "output" // used in the cli )
Variables ¶
This section is empty.
Functions ¶
func BindFlagsLoadViper ¶
Bind all flags and read the config into viper
func PrepareBaseCmd ¶
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.