cmd

package
v4.0.0-...-7e265f1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Logger is a logger automatically configured by command line options
	Logger zerolog.Logger

	// LoggerOutput is the writer where the Logger writes
	LoggerOutput io.Writer
)
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