func (rd *AAAA) Encode(b *dns.Wirebuf) {
	ip6(rd.Address).Encode(b)
}
Implementation of dns.Wirer
package rr
import (
	"bytes"
	"crypto"
	_ "crypto/sha256"
	"encoding/hex"
	"errors"
	"fmt"
	"github.com/cznic/dns"
	"github.com/cznic/strutil"
	"log"
	"net"
	"strconv"
	"strings"
	"time"
)
const asserts = false
var sha256 = crypto.SHA256
func init() {
	if asserts {
		println("WARNING: cznic/dns/rr - assertions enabled")
	}
}
func quote(s string) string {
	return dns.CharString(s).Quoted()
}
type A struct {
	Address net.IP  
}
func (rd *A) Encode(b *dns.Wirebuf) {
	ip4(rd.Address).Encode(b)
}
func (rd *A) Decode(b []byte, pos *int, sniffer dns.WireDecodeSniffer) (err error) {
	p0 := &b[*pos]
	if err = (*ip4)(&rd.Address).Decode(b, pos, sniffer); err != nil {
		return
	}
	if sniffer != nil {
		sniffer(p0, &b[*pos-1], dns.SniffRDataA, rd)
	}
	return
}
func (rd *A) String() string {
	return rd.Address.String()
}
type AAAA struct {
	Address net.IP  
}