aboutsummaryrefslogtreecommitdiff
path: root/plugin/forward/persistent_test.go
diff options
context:
space:
mode:
authorGravatar ZouYu <zouy.fnst@cn.fujitsu.com> 2020-10-28 14:39:56 +0800
committerGravatar GitHub <noreply@github.com> 2020-10-28 07:39:56 +0100
commitc58e4b09fcc07157595a3fc1db7649a4033c3258 (patch)
treefd4e113ef617e01be726130d06f94707ed68777f /plugin/forward/persistent_test.go
parentd6660f369ebb67c861ae9ab0fe9429c513f8278f (diff)
downloadcoredns-c58e4b09fcc07157595a3fc1db7649a4033c3258.tar.gz
coredns-c58e4b09fcc07157595a3fc1db7649a4033c3258.tar.zst
coredns-c58e4b09fcc07157595a3fc1db7649a4033c3258.zip
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>
Diffstat (limited to 'plugin/forward/persistent_test.go')
-rw-r--r--plugin/forward/persistent_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugin/forward/persistent_test.go b/plugin/forward/persistent_test.go
index 9ea0cdc10..633696ac0 100644
--- a/plugin/forward/persistent_test.go
+++ b/plugin/forward/persistent_test.go
@@ -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")
}
}