Run gofmt -w -s *.go (#1408)
Signed-off-by: Miek Gieben <miek@miek.nl> Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
parent
caa3fe0583
commit
4bd038eb76
|
@ -19,7 +19,6 @@ type MsgAcceptFunc func(dh Header) MsgAcceptAction
|
||||||
// * has more than 0 RRs in the Authority section
|
// * has more than 0 RRs in the Authority section
|
||||||
//
|
//
|
||||||
// * has more than 2 RRs in the Additional section
|
// * has more than 2 RRs in the Additional section
|
||||||
//
|
|
||||||
var DefaultMsgAcceptFunc MsgAcceptFunc = defaultMsgAcceptFunc
|
var DefaultMsgAcceptFunc MsgAcceptFunc = defaultMsgAcceptFunc
|
||||||
|
|
||||||
// MsgAcceptAction represents the action to be taken.
|
// MsgAcceptAction represents the action to be taken.
|
||||||
|
|
|
@ -431,7 +431,6 @@ func ExchangeContext(ctx context.Context, m *Msg, a string) (r *Msg, err error)
|
||||||
// co.WriteMsg(m)
|
// co.WriteMsg(m)
|
||||||
// in, _ := co.ReadMsg()
|
// in, _ := co.ReadMsg()
|
||||||
// co.Close()
|
// co.Close()
|
||||||
//
|
|
||||||
func ExchangeConn(c net.Conn, m *Msg) (r *Msg, err error) {
|
func ExchangeConn(c net.Conn, m *Msg) (r *Msg, err error) {
|
||||||
println("dns: ExchangeConn: this function is deprecated")
|
println("dns: ExchangeConn: this function is deprecated")
|
||||||
co := new(Conn)
|
co := new(Conn)
|
||||||
|
|
12
doc.go
12
doc.go
|
@ -96,7 +96,7 @@ the Answer section:
|
||||||
// do something with t.Txt
|
// do something with t.Txt
|
||||||
}
|
}
|
||||||
|
|
||||||
Domain Name and TXT Character String Representations
|
# Domain Name and TXT Character String Representations
|
||||||
|
|
||||||
Both domain names and TXT character strings are converted to presentation form
|
Both domain names and TXT character strings are converted to presentation form
|
||||||
both when unpacked and when converted to strings.
|
both when unpacked and when converted to strings.
|
||||||
|
@ -108,7 +108,7 @@ be escaped. Bytes below 32 and above 127 will be converted to \DDD form.
|
||||||
For domain names, in addition to the above rules brackets, periods, spaces,
|
For domain names, in addition to the above rules brackets, periods, spaces,
|
||||||
semicolons and the at symbol are escaped.
|
semicolons and the at symbol are escaped.
|
||||||
|
|
||||||
DNSSEC
|
# DNSSEC
|
||||||
|
|
||||||
DNSSEC (DNS Security Extension) adds a layer of security to the DNS. It uses
|
DNSSEC (DNS Security Extension) adds a layer of security to the DNS. It uses
|
||||||
public key cryptography to sign resource records. The public keys are stored in
|
public key cryptography to sign resource records. The public keys are stored in
|
||||||
|
@ -122,7 +122,7 @@ bit to a request.
|
||||||
|
|
||||||
Signature generation, signature verification and key generation are all supported.
|
Signature generation, signature verification and key generation are all supported.
|
||||||
|
|
||||||
DYNAMIC UPDATES
|
# DYNAMIC UPDATES
|
||||||
|
|
||||||
Dynamic updates reuses the DNS message format, but renames three of the
|
Dynamic updates reuses the DNS message format, but renames three of the
|
||||||
sections. Question is Zone, Answer is Prerequisite, Authority is Update, only
|
sections. Question is Zone, Answer is Prerequisite, Authority is Update, only
|
||||||
|
@ -156,7 +156,7 @@ shows the options you have and what functions to call.
|
||||||
NONE rrset rr Delete an RR from RRset dns.Remove
|
NONE rrset rr Delete an RR from RRset dns.Remove
|
||||||
zone rrset rr Add to an RRset dns.Insert
|
zone rrset rr Add to an RRset dns.Insert
|
||||||
|
|
||||||
TRANSACTION SIGNATURE
|
# TRANSACTION SIGNATURE
|
||||||
|
|
||||||
An TSIG or transaction signature adds a HMAC TSIG record to each message sent.
|
An TSIG or transaction signature adds a HMAC TSIG record to each message sent.
|
||||||
The supported algorithms include: HmacSHA1, HmacSHA256 and HmacSHA512.
|
The supported algorithms include: HmacSHA1, HmacSHA256 and HmacSHA512.
|
||||||
|
@ -239,7 +239,7 @@ Basic use pattern validating and replying to a message that has TSIG set.
|
||||||
w.WriteMsg(m)
|
w.WriteMsg(m)
|
||||||
}
|
}
|
||||||
|
|
||||||
PRIVATE RRS
|
# PRIVATE RRS
|
||||||
|
|
||||||
RFC 6895 sets aside a range of type codes for private use. This range is 65,280
|
RFC 6895 sets aside a range of type codes for private use. This range is 65,280
|
||||||
- 65,534 (0xFF00 - 0xFFFE). When experimenting with new Resource Records these
|
- 65,534 (0xFF00 - 0xFFFE). When experimenting with new Resource Records these
|
||||||
|
@ -248,7 +248,7 @@ can be used, before requesting an official type code from IANA.
|
||||||
See https://miek.nl/2014/september/21/idn-and-private-rr-in-go-dns/ for more
|
See https://miek.nl/2014/september/21/idn-and-private-rr-in-go-dns/ for more
|
||||||
information.
|
information.
|
||||||
|
|
||||||
EDNS0
|
# EDNS0
|
||||||
|
|
||||||
EDNS0 is an extension mechanism for the DNS defined in RFC 2671 and updated by
|
EDNS0 is an extension mechanism for the DNS defined in RFC 2671 and updated by
|
||||||
RFC 6891. It defines a new RR type, the OPT RR, which is then completely
|
RFC 6891. It defines a new RR type, the OPT RR, which is then completely
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build ignore
|
||||||
// +build ignore
|
// +build ignore
|
||||||
|
|
||||||
// types_generate.go is meant to run with go generate. It will use
|
// types_generate.go is meant to run with go generate. It will use
|
||||||
|
|
1
fuzz.go
1
fuzz.go
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build fuzz
|
||||||
// +build fuzz
|
// +build fuzz
|
||||||
|
|
||||||
package dns
|
package dns
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !go1.11 || (!aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd)
|
||||||
// +build !go1.11 !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd
|
// +build !go1.11 !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd
|
||||||
|
|
||||||
package dns
|
package dns
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build go1.11 && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd)
|
||||||
// +build go1.11
|
// +build go1.11
|
||||||
// +build aix darwin dragonfly freebsd linux netbsd openbsd
|
// +build aix darwin dragonfly freebsd linux netbsd openbsd
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build ignore
|
||||||
// +build ignore
|
// +build ignore
|
||||||
|
|
||||||
// msg_generate.go is meant to run with go generate. It will use
|
// msg_generate.go is meant to run with go generate. It will use
|
||||||
|
|
1
tools.go
1
tools.go
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build tools
|
||||||
// +build tools
|
// +build tools
|
||||||
|
|
||||||
// We include our tool dependencies for `go generate` here to ensure they're
|
// We include our tool dependencies for `go generate` here to ensure they're
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build ignore
|
||||||
// +build ignore
|
// +build ignore
|
||||||
|
|
||||||
// types_generate.go is meant to run with go generate. It will use
|
// types_generate.go is meant to run with go generate. It will use
|
||||||
|
|
1
udp.go
1
udp.go
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package dns
|
package dns
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build linux && !appengine
|
||||||
// +build linux,!appengine
|
// +build linux,!appengine
|
||||||
|
|
||||||
package dns
|
package dns
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build windows
|
||||||
// +build windows
|
// +build windows
|
||||||
|
|
||||||
package dns
|
package dns
|
||||||
|
|
1
xfr.go
1
xfr.go
|
@ -44,7 +44,6 @@ func (t *Transfer) tsigProvider() TsigProvider {
|
||||||
// dnscon := &dns.Conn{Conn:con}
|
// dnscon := &dns.Conn{Conn:con}
|
||||||
// transfer = &dns.Transfer{Conn: dnscon}
|
// transfer = &dns.Transfer{Conn: dnscon}
|
||||||
// channel, err := transfer.In(message, master)
|
// channel, err := transfer.In(message, master)
|
||||||
//
|
|
||||||
func (t *Transfer) In(q *Msg, a string) (env chan *Envelope, err error) {
|
func (t *Transfer) In(q *Msg, a string) (env chan *Envelope, err error) {
|
||||||
switch q.Question[0].Qtype {
|
switch q.Question[0].Qtype {
|
||||||
case TypeAXFR, TypeIXFR:
|
case TypeAXFR, TypeIXFR:
|
||||||
|
|
Loading…
Reference in New Issue