mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2026-01-16 21:27:12 +08:00
# Issue Fixes https://github.com/StackExchange/dnscontrol/issues/3918 New "modern" types like RP had multiple bugs: * When RP() has an error (for example, wrong # of arguments) no error was printed. * DefaultTTL() was ignored. * FQDNs listed in RP() not properly checked to verify the are part of the D()/D_EXTEND() domain. * REFACTOR: Implement "double domain" checking and the skip_fqdn_check override (instead of in validate.go). * REFACTOR: Always list "names" as Raw, then ASCII, then Unicode. * REFACTOR: Generate domain DisplayName once, use many places # Resolution Fixed and test-cases added to prevent regressions.
19 lines
298 B
Go
19 lines
298 B
Go
package rtypecontrol
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
)
|
|
|
|
func StringifyQuoted(args []any) string {
|
|
if len(args) == 0 {
|
|
return ""
|
|
}
|
|
|
|
var sb strings.Builder
|
|
sb.WriteString(fmt.Sprintf("%q", args[0]))
|
|
for _, arg := range args[1:] {
|
|
sb.WriteString(fmt.Sprintf(" %q", arg))
|
|
}
|
|
return sb.String()
|
|
}
|