cli

package
v0.0.82 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindFlagsAndEnvToViper added in v0.0.69

func BindFlagsAndEnvToViper(cmd *cobra.Command, params interface{}) (err error)

/ BindFlagsAndEnvToViper binds the flags and environment variables to viper / / Example: / type config struct { / Param1 string `mapstructure:"param1" structs:"param1" env:"PARAM1"` / } / / func init() { / rootCmd.AddCommand(listCmd) / flags := listCmd.Flags() / flags.StringVar(&listOpts.format, "format", "Format") / cli.BindFlagsAndEnvToViper(listCmd, listOpts) / }

func ConfigureViper added in v0.0.46

func ConfigureViper(configFilePath string, applicationName string, verbose bool, environmentVariablePrefix string)

func GetOpenCommand

func GetOpenCommand(args ...string) (string, []string)

GetOpenCommand returns the command and its required arguments according to the current operation system

func OpenInBrowser added in v0.0.45

func OpenInBrowser(url string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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