mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-12-27 02:02:48 +08:00
Printing correction count for each provider as we go.
This commit is contained in:
parent
b11254e51f
commit
2fa4f0ece7
1 changed files with 8 additions and 1 deletions
9
main.go
9
main.go
|
@ -173,8 +173,9 @@ func main() {
|
||||||
if !shouldrun {
|
if !shouldrun {
|
||||||
statusLbl = "(skipping)"
|
statusLbl = "(skipping)"
|
||||||
}
|
}
|
||||||
fmt.Printf("----- DNS Provider: %s%s\n", prov, statusLbl)
|
fmt.Printf("----- DNS Provider: %s... %s", prov, statusLbl)
|
||||||
if !shouldrun {
|
if !shouldrun {
|
||||||
|
fmt.Println()
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
dsp, ok := dsps[prov]
|
dsp, ok := dsps[prov]
|
||||||
|
@ -183,11 +184,17 @@ func main() {
|
||||||
}
|
}
|
||||||
corrections, err := dsp.GetDomainCorrections(dc)
|
corrections, err := dsp.GetDomainCorrections(dc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
fmt.Println("ERROR")
|
||||||
anyErrors = true
|
anyErrors = true
|
||||||
fmt.Printf("Error getting corrections: %s\n", err)
|
fmt.Printf("Error getting corrections: %s\n", err)
|
||||||
continue DomainLoop
|
continue DomainLoop
|
||||||
}
|
}
|
||||||
totalCorrections += len(corrections)
|
totalCorrections += len(corrections)
|
||||||
|
plural := "s"
|
||||||
|
if len(corrections) == 1 {
|
||||||
|
plural = ""
|
||||||
|
}
|
||||||
|
fmt.Printf("%d correction%s\n", len(corrections), plural)
|
||||||
anyErrors = printOrRunCorrections(corrections, command) || anyErrors
|
anyErrors = printOrRunCorrections(corrections, command) || anyErrors
|
||||||
}
|
}
|
||||||
if run := shouldRunProvider(domain.Registrar, domain); !run {
|
if run := shouldRunProvider(domain.Registrar, domain); !run {
|
||||||
|
|
Loading…
Reference in a new issue