aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/controller_test.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2019-06-25 08:00:33 +0100
committerGravatar Yong Tang <yong.tang.github@outlook.com> 2019-06-25 15:00:33 +0800
commitcd176f859b2e71d8919c56ff67235c226ab5b48e (patch)
treee1ee9a8c19d3e198627e289dd998caebfa53bb21 /plugin/kubernetes/controller_test.go
parent123628dc469ec90b2414931988ee27993d2d9648 (diff)
downloadcoredns-cd176f859b2e71d8919c56ff67235c226ab5b48e.tar.gz
coredns-cd176f859b2e71d8919c56ff67235c226ab5b48e.tar.zst
coredns-cd176f859b2e71d8919c56ff67235c226ab5b48e.zip
Run gofmt -s and golint on the codebase (#2918)
* Run gofmt -s and golint on the codebase Run golint and fix everythign it flagged (except the context arg ordering), mostly edits in the rewrite plugin. Signed-off-by: Miek Gieben <miek@miek.nl> * ... and ofcourse the test as well Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin/kubernetes/controller_test.go')
-rw-r--r--plugin/kubernetes/controller_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugin/kubernetes/controller_test.go b/plugin/kubernetes/controller_test.go
index 7e1f9dd29..37d4705e4 100644
--- a/plugin/kubernetes/controller_test.go
+++ b/plugin/kubernetes/controller_test.go
@@ -79,7 +79,7 @@ func generateEndpoints(cidr string, client kubernetes.Interface) {
}
ep.ObjectMeta.Name = "svc" + strconv.Itoa(count)
_, err = client.CoreV1().Endpoints("testns").Create(ep)
- count += 1
+ count++
}
}
@@ -94,17 +94,17 @@ func generateSvcs(cidr string, svcType string, client kubernetes.Interface) {
case "clusterip":
for ip := ip.Mask(ipnet.Mask); ipnet.Contains(ip); inc(ip) {
createClusterIPSvc(count, client, ip)
- count += 1
+ count++
}
case "headless":
for ip := ip.Mask(ipnet.Mask); ipnet.Contains(ip); inc(ip) {
createHeadlessSvc(count, client, ip)
- count += 1
+ count++
}
case "external":
for ip := ip.Mask(ipnet.Mask); ipnet.Contains(ip); inc(ip) {
createExternalSvc(count, client, ip)
- count += 1
+ count++
}
default:
for ip := ip.Mask(ipnet.Mask); ipnet.Contains(ip); inc(ip) {
@@ -115,7 +115,7 @@ func generateSvcs(cidr string, svcType string, client kubernetes.Interface) {
} else if count%3 == 2 {
createExternalSvc(count, client, ip)
}
- count += 1
+ count++
}
}
}