From 55aa4480c7e4abfad208a5652bc746023f40b3fb Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Thu, 27 Jun 2013 19:46:26 +0100 Subject: [PATCH] Fix some typos --- labels.go | 11 ++++------- msg.go | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/labels.go b/labels.go index 2c141c1f..72c985da 100644 --- a/labels.go +++ b/labels.go @@ -9,13 +9,10 @@ package dns // SplitDomainName splits a name string into it's labels. // www.miek.nl. returns []string{"www", "miek", "nl"} // The root label (.) returns nil. -func SplitDomainName(s string) []string { - var ( - labels []string - fqdnEnd int // offset of the final '.' or the length of the name - idx = Split(s) - begin = 0 - ) +func SplitDomainName(s string) (labels []string) { + fqdnEnd := 0 // offset of the final '.' or the length of the name + idx := Split(s) + begin := 0 if s[len(s)-1] == '.' { fqdnEnd = len(s) - 1 diff --git a/msg.go b/msg.go index 8ca31b1b..b0cdfe73 100644 --- a/msg.go +++ b/msg.go @@ -1255,7 +1255,7 @@ func (dns *Msg) Pack() (msg []byte, err error) { dh.Nscount = uint16(len(ns)) dh.Arcount = uint16(len(extra)) - msg = make([]byte, dns.packLen()+10) // TODO(miekg): +10 should go sometimses + msg = make([]byte, dns.packLen()+10) // TODO(miekg): +10 should go soon // Pack it in: header and then the pieces. off := 0 off, err = packStructCompress(&dh, msg, off, compression, dns.Compress)