Fix a few deviations from go fmt
This commit is contained in:
1 parent
6c82f781cd
commit
cda6b8d582
3 files changed
+4
-4
No files matched your search
@@ -52,8 +52,8 @@ type DNSServer struct {
|
||||
// Creates a new DNS server
|
||||
func NewDNSServer(config DNSServerConfig, zone Zone, iface *net.Interface) (s *DNSServer, err error) {
|
||||
s = &DNSServer{
|
||||
zone: zone,
|
||||
iface: iface,
|
||||
zone: zone,
|
||||
iface: iface,
|
||||
|
||||
Domain: DEFAULT_LOCAL_DOMAIN,
|
||||
IfaceName: DEFAULT_IFACE_NAME,
|
||||
|
||||
@@ -41,7 +41,7 @@ func TestUDPDNSServer(t *testing.T) {
|
||||
m.Answer = make([]dns.RR, 1)
|
||||
m.Answer[0] = &dns.MX{Hdr: dns.RR_Header{Name: m.Question[0].Name, Rrtype: dns.TypeMX, Class: dns.ClassINET, Ttl: 0}, Mx: "mail." + nonLocalName}
|
||||
} else if q.Name == nonLocalName && q.Qtype == dns.TypeANY {
|
||||
m.Answer = make([]dns.RR, 512 / len("mailn."+nonLocalName) + 1)
|
||||
m.Answer = make([]dns.RR, 512/len("mailn."+nonLocalName)+1)
|
||||
for i, _ := range m.Answer {
|
||||
m.Answer[i] = &dns.MX{Hdr: dns.RR_Header{Name: m.Question[0].Name, Rrtype: dns.TypeMX, Class: dns.ClassINET, Ttl: 0}, Mx: fmt.Sprintf("mail%d.%s", i, nonLocalName)}
|
||||
}
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ func (router *Router) UsingPassword() bool {
|
||||
|
||||
func (router *Router) Status() string {
|
||||
var buf bytes.Buffer
|
||||
buf.WriteString(fmt.Sprintln("Our name is", router.Ourself.Name, "(" + router.Ourself.NickName + ")"))
|
||||
buf.WriteString(fmt.Sprintln("Our name is", router.Ourself.Name, "("+router.Ourself.NickName+")"))
|
||||
buf.WriteString(fmt.Sprintln("Sniffing traffic on", router.Iface))
|
||||
buf.WriteString(fmt.Sprintf("MACs:\n%s", router.Macs))
|
||||
buf.WriteString(fmt.Sprintf("Peers:\n%s", router.Peers))
|
||||
|
||||
Reference in new issue
Block a user