Fix some typos

This commit is contained in:
Miek Gieben 2013-06-27 19:46:26 +01:00
parent b651c7ea1f
commit 55aa4480c7
2 changed files with 5 additions and 8 deletions

View File

@ -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

2
msg.go
View File

@ -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)