mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Add --verbose flag, default to less verbose output (#1721)
This commit is contained in:
@ -37,6 +37,7 @@ type PreviewArgs struct {
|
||||
Notify bool
|
||||
WarnChanges bool
|
||||
NoPopulate bool
|
||||
Full bool
|
||||
}
|
||||
|
||||
func (args *PreviewArgs) flags() []cli.Flag {
|
||||
@ -58,6 +59,11 @@ func (args *PreviewArgs) flags() []cli.Flag {
|
||||
Destination: &args.NoPopulate,
|
||||
Usage: `Use this flag to not auto-create non-existing zones at the provider`,
|
||||
})
|
||||
flags = append(flags, &cli.BoolFlag{
|
||||
Name: "full",
|
||||
Destination: &args.Full,
|
||||
Usage: `Add headings, providers names, notifications of no changes, etc`,
|
||||
})
|
||||
return flags
|
||||
}
|
||||
|
||||
@ -102,6 +108,10 @@ func Push(args PushArgs) error {
|
||||
// run is the main routine common to preview/push
|
||||
func run(args PreviewArgs, push bool, interactive bool, out printer.CLI) error {
|
||||
// TODO: make truly CLI independent. Perhaps return results on a channel as they occur
|
||||
|
||||
// This is a hack until we have the new printer replacement.
|
||||
printer.SkinnyReport = !args.Full
|
||||
|
||||
cfg, err := GetDNSConfig(args.GetDNSConfigArgs)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user