Print the root zone as a dot rather than an empty string

Fixes #7
This commit is contained in:
Frank Denis 2018-01-19 12:33:27 +01:00
parent e9e028c970
commit 414d366cb2
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ func NormalizeName(name *[]byte) {
} }
func StripTrailingDot(str string) string { func StripTrailingDot(str string) string {
if strings.HasSuffix(str, ".") { if len(str) > 1 && strings.HasSuffix(str, ".") {
str = str[:len(str)-1] str = str[:len(str)-1]
} }
return str return str