mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-12-09 21:55:57 +08:00
WDYT about printing the domain using unicode again?
This commit is contained in:
parent
53bfdd3615
commit
efab6aaab1
2 changed files with 9 additions and 5 deletions
|
|
@ -289,7 +289,7 @@ func prun(args PPreviewArgs, push bool, interactive bool, out printer.CLI, repor
|
|||
continue // Do not emit noise when zone exists
|
||||
}
|
||||
if !started {
|
||||
out.StartDomain(zone.GetUniqueName())
|
||||
out.StartDomain(zone)
|
||||
started = true
|
||||
}
|
||||
skip := skipProvider(provider.Name, providersToProcess)
|
||||
|
|
@ -352,7 +352,7 @@ func prun(args PPreviewArgs, push bool, interactive bool, out printer.CLI, repor
|
|||
// Now we know what to do, print or do the tasks.
|
||||
out.PrintfIf(fullMode, "PHASE 3: CORRECTIONS\n")
|
||||
for _, zone := range zonesToProcess {
|
||||
out.StartDomain(zone.GetUniqueName())
|
||||
out.StartDomain(zone)
|
||||
|
||||
// Process DNS provider changes:
|
||||
providersToProcess := whichProvidersToProcess(zone.DNSProviderInstances, args.Providers)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import (
|
|||
// CLI is an abstraction around the CLI.
|
||||
type CLI interface {
|
||||
Printer
|
||||
StartDomain(domain string)
|
||||
StartDomain(dc *models.DomainConfig)
|
||||
StartDNSProvider(name string, skip bool)
|
||||
EndProvider(name string, numCorrections int, err error)
|
||||
EndProvider2(name string, numCorrections int)
|
||||
|
|
@ -89,8 +89,12 @@ type ConsolePrinter struct {
|
|||
}
|
||||
|
||||
// StartDomain is called at the start of each domain.
|
||||
func (c ConsolePrinter) StartDomain(domain string) {
|
||||
fmt.Fprintf(c.Writer, "******************** Domain: %s\n", domain)
|
||||
func (c ConsolePrinter) StartDomain(dc *models.DomainConfig) {
|
||||
if dc.Name == dc.NameUnicode {
|
||||
fmt.Fprintf(c.Writer, "******************** Domain: %s\n", dc.Name)
|
||||
} else {
|
||||
fmt.Fprintf(c.Writer, "******************** Domain: %s (%s)\n", dc.NameUnicode, dc.Name)
|
||||
}
|
||||
}
|
||||
|
||||
// PrintCorrection is called to print/format each correction.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue