Fix the rest of the URI stuff

This commit is contained in:
Miek Gieben 2013-01-20 15:45:19 +01:00
parent 27c20aff55
commit a86aa5cdb6
1 changed files with 10 additions and 3 deletions

View File

@ -1151,9 +1151,16 @@ func (rr *URI) Header() *RR_Header { return &rr.Hdr }
func (rr *URI) Copy() RR { return &URI{*rr.Hdr.CopyHeader(), rr.Weight, rr.Priority, rr.Target} }
func (rr *URI) String() string {
return rr.Hdr.String() + strconv.Itoa(int(rr.Priority)) +
" " + strconv.Itoa(int(rr.Weight)) +
" " + rr.Target
s := rr.Hdr.String() + strconv.Itoa(int(rr.Priority)) +
" " + strconv.Itoa(int(rr.Weight))
for i, s1 := range rr.Target {
if i > 0 {
s += " " + strconv.QuoteToASCII(s1)
} else {
s += strconv.QuoteToASCII(s1)
}
}
return s
}
func (rr *URI) Len() int {