mirror of
https://github.com/miekg/dns.git
synced 2025-08-20 00:11:00 +02:00
gofmt
This commit is contained in:
parent
2a69247960
commit
7e2d4ac1d4
@ -58,8 +58,8 @@ func addresses(conf *dns.ClientConfig, c *dns.Client, name string) []string {
|
|||||||
m4.SetQuestion(dns.Fqdn(os.Args[1]), dns.TypeA)
|
m4.SetQuestion(dns.Fqdn(os.Args[1]), dns.TypeA)
|
||||||
m6 := new(dns.Msg)
|
m6 := new(dns.Msg)
|
||||||
m6.SetQuestion(dns.Fqdn(os.Args[1]), dns.TypeAAAA)
|
m6.SetQuestion(dns.Fqdn(os.Args[1]), dns.TypeAAAA)
|
||||||
c.Do(m4, conf.Servers[0] + ":" + conf.Port)
|
c.Do(m4, conf.Servers[0]+":"+conf.Port)
|
||||||
c.Do(m6, conf.Servers[0] + ":" + conf.Port)
|
c.Do(m6, conf.Servers[0]+":"+conf.Port)
|
||||||
|
|
||||||
var ips []string
|
var ips []string
|
||||||
i := 2 // two outstanding queries
|
i := 2 // two outstanding queries
|
||||||
|
@ -214,7 +214,6 @@ func toFingerprint(m *dns.Msg) *fingerprint {
|
|||||||
f.Query.Qclass = 0
|
f.Query.Qclass = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
f.Opcode = h.Opcode
|
f.Opcode = h.Opcode
|
||||||
f.Rcode = h.Rcode
|
f.Rcode = h.Rcode
|
||||||
f.Response = h.Response
|
f.Response = h.Response
|
||||||
|
@ -76,7 +76,7 @@ func main() {
|
|||||||
listen := flag.String("listen", "127.0.0.1:8053", "set the listener address")
|
listen := flag.String("listen", "127.0.0.1:8053", "set the listener address")
|
||||||
server := flag.String("server", "127.0.0.1:53", "remote server address(es), seperate with commas")
|
server := flag.String("server", "127.0.0.1:53", "remote server address(es), seperate with commas")
|
||||||
verbose = flag.Bool("verbose", false, "Print packet as it flows through")
|
verbose = flag.Bool("verbose", false, "Print packet as it flows through")
|
||||||
// cpuprofile := flag.String("cpuprofile", "", "write cpu profile to file")
|
// cpuprofile := flag.String("cpuprofile", "", "write cpu profile to file")
|
||||||
flag.Usage = func() {
|
flag.Usage = func() {
|
||||||
flag.PrintDefaults()
|
flag.PrintDefaults()
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ func main() {
|
|||||||
m.SetEdns0(2048, true)
|
m.SetEdns0(2048, true)
|
||||||
|
|
||||||
c := dns.NewClient()
|
c := dns.NewClient()
|
||||||
r, _ := c.Exchange(m, conf.Servers[0] + ":" + conf.Port)
|
r, _ := c.Exchange(m, conf.Servers[0]+":"+conf.Port)
|
||||||
if r == nil {
|
if r == nil {
|
||||||
fmt.Printf("*** no answer received for %s\n", os.Args[1])
|
fmt.Printf("*** no answer received for %s\n", os.Args[1])
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user