mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 10:43:17 -04:00
Golint middleware/proxy (#290)
While looking into the proxy middleware it appears that there are several golint messages: ``` ubuntu@ubuntu:~/coredns$ golint middleware/proxy/ middleware/proxy/lookup.go:66:1: exported method Proxy.Forward should have comment or be unexported middleware/proxy/proxy.go:24:6: exported type Client should have comment or be unexported middleware/proxy/proxy.go:107:1: exported function Clients should have comment or be unexported middleware/proxy/reverseproxy.go:10:6: exported type ReverseProxy should have comment or be unexported middleware/proxy/reverseproxy.go:16:1: exported method ReverseProxy.ServeDNS should have comment or be unexported middleware/proxy/upstream.go:42:6: exported type Options should have comment or be unexported ``` This fix addressed the above golint messages. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
@@ -21,6 +21,7 @@ type Proxy struct {
|
||||
Upstreams []Upstream
|
||||
}
|
||||
|
||||
// Client represents client information that the proxy uses.
|
||||
type Client struct {
|
||||
UDP *dns.Client
|
||||
TCP *dns.Client
|
||||
@@ -104,6 +105,7 @@ func (p Proxy) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (
|
||||
return p.Next.ServeDNS(ctx, w, r)
|
||||
}
|
||||
|
||||
// Clients returns the new client for proxy requests.
|
||||
func Clients() Client {
|
||||
udp := newClient("udp", defaultTimeout)
|
||||
tcp := newClient("tcp", defaultTimeout)
|
||||
|
||||
Reference in New Issue
Block a user