refactor: move flag to internal/common
This commit is contained in:
parent
467947edf2
commit
06f8078866
14
cli/cli.go
14
cli/cli.go
|
@ -18,18 +18,6 @@ import (
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Verbose stores the variable from VerboseFlag.
|
|
||||||
var Verbose bool
|
|
||||||
|
|
||||||
// VerboseFlag turns on/off verbose logging down to the INFO level.
|
|
||||||
var VerboseFlag = &cli.BoolFlag{
|
|
||||||
Name: "verbose",
|
|
||||||
Aliases: []string{"V"},
|
|
||||||
Value: false,
|
|
||||||
Destination: &Verbose,
|
|
||||||
Usage: "Show INFO messages",
|
|
||||||
}
|
|
||||||
|
|
||||||
func newAbraApp(version, commit string) *cli.App {
|
func newAbraApp(version, commit string) *cli.App {
|
||||||
app := &cli.App{
|
app := &cli.App{
|
||||||
Name: "abra",
|
Name: "abra",
|
||||||
|
@ -55,7 +43,7 @@ convenient command-line experience. See "abra autocomplete -h" for more.
|
||||||
AutoCompleteCommand,
|
AutoCompleteCommand,
|
||||||
},
|
},
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
VerboseFlag,
|
internal.VerboseFlag,
|
||||||
internal.DebugFlag,
|
internal.DebugFlag,
|
||||||
internal.NoInputFlag,
|
internal.NoInputFlag,
|
||||||
},
|
},
|
||||||
|
|
|
@ -272,6 +272,18 @@ var DebugFlag = &cli.BoolFlag{
|
||||||
Usage: "Show DEBUG messages",
|
Usage: "Show DEBUG messages",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Verbose stores the variable from VerboseFlag.
|
||||||
|
var Verbose bool
|
||||||
|
|
||||||
|
// VerboseFlag turns on/off verbose logging down to the INFO level.
|
||||||
|
var VerboseFlag = &cli.BoolFlag{
|
||||||
|
Name: "verbose",
|
||||||
|
Aliases: []string{"V"},
|
||||||
|
Value: false,
|
||||||
|
Destination: &Verbose,
|
||||||
|
Usage: "Show INFO messages",
|
||||||
|
}
|
||||||
|
|
||||||
// SSHFailMsg is a hopefully helpful SSH failure message
|
// SSHFailMsg is a hopefully helpful SSH failure message
|
||||||
var SSHFailMsg = `
|
var SSHFailMsg = `
|
||||||
Woops, Abra is unable to connect to connect to %s.
|
Woops, Abra is unable to connect to connect to %s.
|
||||||
|
|
Loading…
Reference in New Issue