mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 16:54:15 -04:00
Fix golint warnings (#4241)
Include: 1. plugin/forward/type.go:8:2: const typeUdp should be typeUDP 2. plugin/forward/type.go:9:2: const typeTcp should be typeTCP 3. plugin/forward/type.go:10:2: const typeTls should be typeTLS 4. plugin/kubernetes/metrics.go:24:2: var DnsProgrammingLatency should be DNSProgrammingLatency 5. plugin/kubernetes/metrics_test.go:124:102: func parameter clusterIp should be clusterIP Signed-off-by: zouyu <zouy.fnst@cn.fujitsu.com>
This commit is contained in:
@@ -96,14 +96,14 @@ func TestCleanupAll(t *testing.T) {
|
||||
c2, _ := dns.DialTimeout("udp", tr.addr, maxDialTimeout)
|
||||
c3, _ := dns.DialTimeout("udp", tr.addr, maxDialTimeout)
|
||||
|
||||
tr.conns[typeUdp] = []*persistConn{{c1, time.Now()}, {c2, time.Now()}, {c3, time.Now()}}
|
||||
tr.conns[typeUDP] = []*persistConn{{c1, time.Now()}, {c2, time.Now()}, {c3, time.Now()}}
|
||||
|
||||
if len(tr.conns[typeUdp]) != 3 {
|
||||
if len(tr.conns[typeUDP]) != 3 {
|
||||
t.Error("Expected 3 connections")
|
||||
}
|
||||
tr.cleanup(true)
|
||||
|
||||
if len(tr.conns[typeUdp]) > 0 {
|
||||
if len(tr.conns[typeUDP]) > 0 {
|
||||
t.Error("Expected no cached connections")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user