Fix some typos
This commit is contained in:
parent
b651c7ea1f
commit
55aa4480c7
11
labels.go
11
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
|
||||
|
|
2
msg.go
2
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)
|
||||
|
|
Loading…
Reference in New Issue