From f3bb703019922c9853e54cd784b46aad7f626806 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Tue, 22 May 2012 08:48:26 +0200 Subject: [PATCH] gofmt --- client.go | 6 +++--- types.go | 14 +++++++------- zgenerate.go | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/client.go b/client.go index d32b0797..ec141cbc 100644 --- a/client.go +++ b/client.go @@ -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[] @@ -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 { diff --git a/types.go b/types.go index c8bf807b..3a66d225 100644 --- a/types.go +++ b/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 } diff --git a/zgenerate.go b/zgenerate.go index b6e851a6..c4fb0fe6 100644 --- a/zgenerate.go +++ b/zgenerate.go @@ -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 )