cmd

package
v0.0.0-...-05a97e5 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger xbus.Logger

Logger is a logger automatically configured by command line options

View Source
var RootCmd = &cobra.Command{
	Use:   "xbus-client",
	Short: "Xbus client utility",
	Long: `Xbus client utility

xbus-client is a utility for managing a xbus client.`,
}

RootCmd represents the base command when called without any subcommands

View Source
var (

	// Viper is Viper instance that rootCmd (and children) will use
	Viper = viper.New()
)

Functions

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GetClient

func GetClient(nocert bool) (*xbus.Client, error)

GetClient returns a Client based on the configuration file and flags

func SetupVersionFlag

func SetupVersionFlag()

SetupVersionFlag add a '--version' flag to the root command. It show the version number found in ClientVersion

Types

This section is empty.

Jump to

Keyboard shortcuts

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