Debian Codegraph @

dnstest/msg.go

raw
1 package dnstest
2
3 import "codeberg.org/miekg/dns"
4
5 // NewMsg returns a test message with an ID of 3, the question set to www.example.org./A. The message is
6 // packed before it is returned.
7 func NewMsg() *dns.Msg {
8 m := dns.NewMsg("www.example.org.", dns.TypeA)
9 m.ID = 3
10 m.Pack()
11 return m
12 }