From ea39a6fde6842fb7cf806af5b846bb45036829ab Mon Sep 17 00:00:00 2001 From: v2ray Date: Sun, 24 Jul 2016 13:44:29 +0200 Subject: [PATCH] format code --- app/dns/nameserver.go | 2 +- shell/point/inbound_detour_dynamic.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/dns/nameserver.go b/app/dns/nameserver.go index 6fef31d0a..26f9b3d50 100644 --- a/app/dns/nameserver.go +++ b/app/dns/nameserver.go @@ -149,7 +149,7 @@ func (this *UDPNameServer) BuildQueryA(domain string, id uint16) *alloc.Buffer { msg.Id = id msg.RecursionDesired = true msg.Question = []dns.Question{ - dns.Question{ + { Name: dns.Fqdn(domain), Qtype: dns.TypeA, Qclass: dns.ClassINET, diff --git a/shell/point/inbound_detour_dynamic.go b/shell/point/inbound_detour_dynamic.go index 941118077..634525a33 100644 --- a/shell/point/inbound_detour_dynamic.go +++ b/shell/point/inbound_detour_dynamic.go @@ -98,7 +98,7 @@ func (this *InboundDetourHandlerDynamic) refresh() error { this.ich2Recyle = this.ichs newIchs := make([]proxy.InboundHandler, config.Allocation.Concurrency) - for idx, _ := range newIchs { + for idx := range newIchs { err := retry.Timed(5, 100).On(func() error { port := this.pickUnusedPort() ich, err := proxyrepo.CreateInboundHandler(config.Protocol, this.space, config.Settings, &proxy.InboundHandlerMeta{