code: func toMsg(g *googleMsg) (*dns.Msg, error) {
  	m := new(dns.Msg)
  	m.Response = true
  	m.Rcode = g.Status
  	m.Truncated = g.TC
  	m.RecursionDesired = g.RD
  	m.RecursionAvailable = g.RA
  	m.AuthenticatedData = g.AD
  	m.CheckingDisabled = g.CD
  
  	m.Question = make([]dns.Question, 1)
  	m.Answer = make([]dns.RR, len(g.Answer))
  	m.Ns = make([]dns.RR, len(g.Authority))
  	m.Extra = make([]dns.RR, len(g.Additional))
  
  	m.Question[0] = dns.Question{Name: g.Question[0].Name, Qtype: g.Question[0].Type, Qclass: dns.ClassINET}
  
  	var err error
  	for i := 0; i < len(m.Answer); i++ {
  		m.Answer[i], err = toRR(g.Answer[i])
  		if err != nil {
  			return nil, err
  		}
  	}
  	for i := 0; i < len(m.Ns); i++ {
  		m.Ns[i], err = toRR(g.Authority[i])
  		if err != nil {
  			return nil, err
  		}
  	}
  	for i := 0; i < len(m.Extra); i++ {
  		m.Extra[i], err = toRR(g.Additional[i])
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	return m, nil
  }
docs: // toMsg converts a googleMsg into the dns message.