aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2019-08-24 18:14:25 +0000
committerGravatar GitHub <noreply@github.com> 2019-08-24 18:14:25 +0000
commit07748d0c34b4c8329dfce8d1fe976ba61152dfec (patch)
treea2b1a2eb5481f4ea769e7c34c937d44ecd62a8c7 /plugin
parent62451fd3eb68cef5dcdafe6e4228f08cf52d84fc (diff)
downloadcoredns-07748d0c34b4c8329dfce8d1fe976ba61152dfec.tar.gz
coredns-07748d0c34b4c8329dfce8d1fe976ba61152dfec.tar.zst
coredns-07748d0c34b4c8329dfce8d1fe976ba61152dfec.zip
go report card fixes (#3182)
Went over the list at https://goreportcard.com/report/github.com/coredns/coredns and removed/fix some code to make it slightly happier. Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin')
-rw-r--r--plugin/cancel/cancel_test.go1
-rw-r--r--plugin/done.go1
-rw-r--r--plugin/etcd/msg/service_test.go9
-rw-r--r--plugin/kubernetes/controller_test.go2
4 files changed, 1 insertions, 12 deletions
diff --git a/plugin/cancel/cancel_test.go b/plugin/cancel/cancel_test.go
index ceba9f5d2..f77551809 100644
--- a/plugin/cancel/cancel_test.go
+++ b/plugin/cancel/cancel_test.go
@@ -34,7 +34,6 @@ func (s sleepPlugin) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.
return 0, nil
}
}
- return 0, nil
}
func TestCancel(t *testing.T) {
diff --git a/plugin/done.go b/plugin/done.go
index 3f53273da..c6ff8633b 100644
--- a/plugin/done.go
+++ b/plugin/done.go
@@ -10,5 +10,4 @@ func Done(ctx context.Context) bool {
default:
return false
}
- return false
}
diff --git a/plugin/etcd/msg/service_test.go b/plugin/etcd/msg/service_test.go
index a5038ac2c..f334aa5ce 100644
--- a/plugin/etcd/msg/service_test.go
+++ b/plugin/etcd/msg/service_test.go
@@ -123,12 +123,3 @@ func TestGroup(t *testing.T) {
t.Fatalf("Failure to group seventh set: %v", sx)
}
}
-
-func BenchmarkNewSRV(b *testing.B) {
- s := &Service{Host: "www,example.org", Port: 8080}
- for n := 0; n < b.N; n++ {
- srv := s.NewSRV("www.example.org.", 16)
- // this assignment makes sure s.NewSRV doesn't get optimized out
- srv = srv
- }
-}
diff --git a/plugin/kubernetes/controller_test.go b/plugin/kubernetes/controller_test.go
index 37d4705e4..f945684cb 100644
--- a/plugin/kubernetes/controller_test.go
+++ b/plugin/kubernetes/controller_test.go
@@ -78,7 +78,7 @@ func generateEndpoints(cidr string, client kubernetes.Interface) {
},
}
ep.ObjectMeta.Name = "svc" + strconv.Itoa(count)
- _, err = client.CoreV1().Endpoints("testns").Create(ep)
+ client.CoreV1().Endpoints("testns").Create(ep)
count++
}
}