cfgcli

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: BSD-3-Clause Imports: 2 Imported by: 54

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConfigPath is a global variable used to store the value of configFlag parsed from the flags for the cli.App
	// returned by NewApp.
	ConfigPath string
	// ConfigJSON is a global variable used to store the value of jsonFlag parsed from the flags for the cli.App
	// returned by NewApp.
	ConfigJSON string
)

Functions

func Handler

func Handler() cli.Option

Handler returns a cli.Option that configures a cli.App as a config CLI application that is configured with flags for a configuration file and configuration JSON. The application is configured with a "Before" hook that parses the values of the flag and stores it in the "ConfigPath" and "ConfigJSON" variables (and executes and "Before" hook that was previously defined).

func NewApp

func NewApp() *cli.App

NewApp returns a new cli.App configured using Handler.

Types

This section is empty.

Jump to

Keyboard shortcuts

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