mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
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>
This commit is contained in:
@@ -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++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user