Remove this
This commit is contained in:
parent
75d28c4399
commit
8b1d640082
|
@ -1,8 +0,0 @@
|
|||
# Copyright 2009 The Go Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style
|
||||
# license that can be found in the LICENSE file.
|
||||
include $(GOROOT)/src/Make.inc
|
||||
TARG=notify
|
||||
GOFILES=notify.go
|
||||
DEPS=../../
|
||||
include $(GOROOT)/src/Make.cmd
|
|
@ -1,38 +0,0 @@
|
|||
package main
|
||||
|
||||
// Send a DNS notify
|
||||
// (c) Miek Gieben - 2011
|
||||
import (
|
||||
"dns"
|
||||
"dns/resolver"
|
||||
"os"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
r := new(resolver.Resolver)
|
||||
qr := r.NewQuerier()
|
||||
r.Servers = []string{"127.0.0.1"}
|
||||
r.Timeout = 2
|
||||
r.Attempts = 1
|
||||
var in resolver.Msg
|
||||
|
||||
if len(os.Args) != 2 {
|
||||
fmt.Printf("%s NAMESERVER\n", os.Args[0])
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
m := new(dns.Msg)
|
||||
m.Question = make([]dns.Question, 1)
|
||||
m.Question[0] = dns.Question{"miek.nl", dns.TypeSOA, dns.ClassINET}
|
||||
m.MsgHdr.Opcode = dns.OpcodeNotify
|
||||
qr <- resolver.Msg{m, nil, nil}
|
||||
in = <-qr
|
||||
if in.Dns != nil {
|
||||
fmt.Printf("%v\n", in.Dns)
|
||||
}
|
||||
|
||||
// Stop the resolver, send it a null mesg
|
||||
qr <- resolver.Msg{}
|
||||
<-qr
|
||||
}
|
Loading…
Reference in New Issue