gofmt
This commit is contained in:
parent
3e607a3c64
commit
f3bb703019
|
@ -173,7 +173,7 @@ type Client struct {
|
|||
Attempts int // number of attempts
|
||||
Retry bool // retry with TCP
|
||||
Request chan *Request // read DNS request from this channel
|
||||
Reply chan *Exchange // write replies to this channel
|
||||
Reply chan *Exchange // write replies to this channel
|
||||
ReadTimeout time.Duration // the net.Conn.SetReadTimeout value for new connections (ns)
|
||||
WriteTimeout time.Duration // the net.Conn.SetWriteTimeout value for new connections (ns)
|
||||
TsigSecret map[string]string // secret(s) for Tsig map[<zonename>]<base64 secret>
|
||||
|
@ -196,8 +196,8 @@ func NewClient() *Client {
|
|||
}
|
||||
|
||||
type Query struct {
|
||||
Request chan *Request // read DNS request from this channel
|
||||
Handler QueryHandler // handler to invoke, dns.DefaultQueryMux if nil
|
||||
Request chan *Request // read DNS request from this channel
|
||||
Handler QueryHandler // handler to invoke, dns.DefaultQueryMux if nil
|
||||
}
|
||||
|
||||
func (q *Query) Query() error {
|
||||
|
|
14
types.go
14
types.go
|
@ -479,7 +479,7 @@ func (rr *RR_SRV) Len() int {
|
|||
type RR_NAPTR struct {
|
||||
Hdr RR_Header
|
||||
Order uint16
|
||||
Pref uint16
|
||||
Pref uint16
|
||||
Flags string
|
||||
Service string
|
||||
Regexp string
|
||||
|
@ -756,9 +756,9 @@ func (rr *RR_DLV) Len() int {
|
|||
}
|
||||
|
||||
type RR_KX struct {
|
||||
Hdr RR_Header
|
||||
Pref uint16
|
||||
Exchanger string `dns:"domain-name"`
|
||||
Hdr RR_Header
|
||||
Pref uint16
|
||||
Exchanger string `dns:"domain-name"`
|
||||
}
|
||||
|
||||
func (rr *RR_KX) Header() *RR_Header {
|
||||
|
@ -1100,11 +1100,11 @@ func (rr *RR_HIP) Len() int {
|
|||
// string representation used when printing the record.
|
||||
// It takes serial arithmetic (RFC 1982) into account.
|
||||
func TimeToDate(t uint32) string {
|
||||
mod := ( (int64(t) - time.Now().Unix()) / Year68 ) - 1
|
||||
mod := ((int64(t) - time.Now().Unix()) / Year68) - 1
|
||||
if mod < 0 {
|
||||
mod = 0
|
||||
}
|
||||
ti := time.Unix(int64(t) - (mod * Year68), 0).UTC()
|
||||
ti := time.Unix(int64(t)-(mod*Year68), 0).UTC()
|
||||
return ti.Format("20060102150405")
|
||||
}
|
||||
|
||||
|
@ -1116,7 +1116,7 @@ func DateToTime(s string) (uint32, error) {
|
|||
if e != nil {
|
||||
return 0, e
|
||||
}
|
||||
mod := ( t.Unix() / Year68 ) - 1
|
||||
mod := (t.Unix() / Year68) - 1
|
||||
if mod < 0 {
|
||||
mod = 0
|
||||
}
|
||||
|
|
|
@ -62,9 +62,9 @@ BuildRR:
|
|||
for i := start; i <= end; i += step {
|
||||
var (
|
||||
escape bool
|
||||
dom string
|
||||
mod string
|
||||
err string
|
||||
dom string
|
||||
mod string
|
||||
err string
|
||||
offset int
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue