func (rd *WKS) Encode(b *dns.Wirebuf) {
	ip4(rd.Address).Encode(b)
	dns.Octet(rd.Protocol).Encode(b)
	bits := make([]byte, 0, 1024/8)
	for k := range rd.Ports {
		i := int(k)
		x := i >> 3
		mask := 1 << uint(i&7)
		if x >= len(bits) {
			bits = bits[:x+1]
		}
		bits[x] |= byte(mask)
	}
	b.Buf = append(b.Buf, bits...)
}
// Implementation of dns.Wirer
Implementation of dns.Wirer
// Implementation of dns . Wirer
func (rd *WKS) Encode(b *dns.Wirebuf) {
	ip4(rd.Address).Encode(b)
	dns.Octet(rd.Protocol).Encode(b)
	bits := make([]byte, 0, 1024/8)
	for k := range rd.Ports {
		i := int(k)
		x := i >> 3
		mask := 1 << uint(i&7)
		if x >= len(bits) {
			bits = bits[:x+1]
		}
		bits[x] |= byte(mask)
	}
	b.Buf = append(b.Buf, bits...)
}
func ( rd * WKS ) Encode ( b * dns . Wirebuf ) { ip4 ( rd . Address ) . Encode ( b ) dns . Octet ( rd . Protocol ) . Encode ( b ) bits := make ( [ ] byte , 0 , 1024 / 8 ) for k := range rd . Ports { i := int ( k ) x := i >> 3 mask := 1 << uint ( i & 7 ) if x >= len ( bits ) { bits = bits [ : x + 1 ] } bits [ x ] |= byte ( mask ) } b . Buf = append ( b . Buf , bits ... ) }
Implementation of dns.Wirer
Implementation of dns . Wirer