diff --git a/commands/previewPush.go b/commands/previewPush.go index 8c65bfd3f..1ba6b71fb 100644 --- a/commands/previewPush.go +++ b/commands/previewPush.go @@ -190,7 +190,7 @@ DomainLoop: /// This is where we should audit? corrections, err := provider.Driver.GetDomainCorrections(dc) - out.EndProvider(len(corrections), err) + out.EndProvider(provider.Name, len(corrections), err) if err != nil { anyErrors = true continue DomainLoop @@ -212,7 +212,7 @@ DomainLoop: log.Fatal(err) } corrections, err := domain.RegistrarInstance.Driver.GetRegistrarCorrections(dc) - out.EndProvider(len(corrections), err) + out.EndProvider(domain.RegistrarName, len(corrections), err) if err != nil { anyErrors = true continue diff --git a/pkg/printer/printer.go b/pkg/printer/printer.go index 798929ead..943413f84 100644 --- a/pkg/printer/printer.go +++ b/pkg/printer/printer.go @@ -15,7 +15,7 @@ type CLI interface { Printer StartDomain(domain string) StartDNSProvider(name string, skip bool) - EndProvider(numCorrections int, err error) + EndProvider(name string, numCorrections int, err error) StartRegistrar(name string, skip bool) PrintCorrection(n int, c *models.Correction) @@ -139,10 +139,10 @@ func (c ConsolePrinter) StartRegistrar(provider string, skip bool) { } // EndProvider is called at the end of each provider. -func (c ConsolePrinter) EndProvider(numCorrections int, err error) { +func (c ConsolePrinter) EndProvider(name string, numCorrections int, err error) { if err != nil { fmt.Fprintln(c.Writer, "ERROR") - fmt.Fprintf(c.Writer, "Error getting corrections: %s\n", err) + fmt.Fprintf(c.Writer, "Error getting corrections (%s): %s\n", name, err) } else { plural := "s" if numCorrections == 1 { @@ -151,7 +151,7 @@ func (c ConsolePrinter) EndProvider(numCorrections int, err error) { if (SkinnyReport) && (numCorrections == 0) { return } - fmt.Fprintf(c.Writer, "%d correction%s\n", numCorrections, plural) + fmt.Fprintf(c.Writer, "%d correction%s (%s)\n", numCorrections, plural, name) } }