diff options
author | 2016-09-21 17:01:19 +0100 | |
---|---|---|
committer | 2016-09-21 17:01:19 +0100 | |
commit | 5301c5af5fde0ad5bf063e12decd4c5202047457 (patch) | |
tree | fc9957fc5382285f27c12436b9f4da9aae670548 /request | |
parent | 7b79458c8a659a4cc8fffb5f678321a0fdd09333 (diff) | |
download | coredns-5301c5af5fde0ad5bf063e12decd4c5202047457.tar.gz coredns-5301c5af5fde0ad5bf063e12decd4c5202047457.tar.zst coredns-5301c5af5fde0ad5bf063e12decd4c5202047457.zip |
Run golint and go vet (#276)
Cleanup the errors and removed deadcode along the way. The leaves
some error laying around, mostly about commenting exported identifier.
We should look hard if those really are needed.
Diffstat (limited to 'request')
-rw-r--r-- | request/request.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/request/request.go b/request/request.go index 49d7312af..004b87696 100644 --- a/request/request.go +++ b/request/request.go @@ -40,7 +40,7 @@ func (r *Request) IP() string { return ip } -// Post gets the (remote) Port of the client making the request. +// Port gets the (remote) Port of the client making the request. func (r *Request) Port() string { _, port, err := net.SplitHostPort(r.W.RemoteAddr().String()) if err != nil { @@ -57,9 +57,9 @@ func (r *Request) RemoteAddr() string { // Proto gets the protocol used as the transport. This will be udp or tcp. func (r *Request) Proto() string { return Proto(r.W) } -// FIXME(miek): why not a method on Request // Proto gets the protocol used as the transport. This will be udp or tcp. func Proto(w dns.ResponseWriter) string { + // FIXME(miek): why not a method on Request if _, ok := w.RemoteAddr().(*net.UDPAddr); ok { return "udp" } |