aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/etcd/etcd.go2
-rw-r--r--plugin/k8s_external/apex_test.go2
-rw-r--r--plugin/k8s_external/external_test.go2
-rw-r--r--plugin/kubernetes/external_test.go8
-rw-r--r--plugin/kubernetes/handler_test.go4
-rw-r--r--plugin/kubernetes/xfr_test.go4
6 files changed, 11 insertions, 11 deletions
diff --git a/plugin/etcd/etcd.go b/plugin/etcd/etcd.go
index c75261b41..1f091c487 100644
--- a/plugin/etcd/etcd.go
+++ b/plugin/etcd/etcd.go
@@ -185,4 +185,4 @@ func shouldInclude(serv *msg.Service, qType uint16) bool {
return serv.Text != ""
}
return serv.Host != ""
-} \ No newline at end of file
+}
diff --git a/plugin/k8s_external/apex_test.go b/plugin/k8s_external/apex_test.go
index ba94a044a..14aaf64bc 100644
--- a/plugin/k8s_external/apex_test.go
+++ b/plugin/k8s_external/apex_test.go
@@ -13,7 +13,7 @@ import (
func TestApex(t *testing.T) {
k := kubernetes.New([]string{"cluster.local."})
- k.Namespaces = map[string]struct{}{"testns": struct{}{}}
+ k.Namespaces = map[string]struct{}{"testns": {}}
k.APIConn = &external{}
e := New()
diff --git a/plugin/k8s_external/external_test.go b/plugin/k8s_external/external_test.go
index 621ff9933..40c7cb927 100644
--- a/plugin/k8s_external/external_test.go
+++ b/plugin/k8s_external/external_test.go
@@ -17,7 +17,7 @@ import (
func TestExternal(t *testing.T) {
k := kubernetes.New([]string{"cluster.local."})
- k.Namespaces = map[string]struct{}{"testns": struct{}{}}
+ k.Namespaces = map[string]struct{}{"testns": {}}
k.APIConn = &external{}
e := New()
diff --git a/plugin/kubernetes/external_test.go b/plugin/kubernetes/external_test.go
index d3762961a..dabbd9489 100644
--- a/plugin/kubernetes/external_test.go
+++ b/plugin/kubernetes/external_test.go
@@ -22,13 +22,13 @@ var extCases = []struct {
{
Qname: "svc1.testns.example.org.", Rcode: dns.RcodeSuccess,
Msg: []msg.Service{
- msg.Service{Host: "1.2.3.4", Port: 80, TTL: 5, Key: "/c/org/example/testns/svc1"},
+ {Host: "1.2.3.4", Port: 80, TTL: 5, Key: "/c/org/example/testns/svc1"},
},
},
{
Qname: "svc6.testns.example.org.", Rcode: dns.RcodeSuccess,
Msg: []msg.Service{
- msg.Service{Host: "1:2::5", Port: 80, TTL: 5, Key: "/c/org/example/testns/svc1"},
+ {Host: "1:2::5", Port: 80, TTL: 5, Key: "/c/org/example/testns/svc1"},
},
},
{
@@ -37,7 +37,7 @@ var extCases = []struct {
{
Qname: "_http._tcp.svc1.testns.example.com.", Rcode: dns.RcodeSuccess,
Msg: []msg.Service{
- msg.Service{Host: "1.2.3.4", Port: 80, TTL: 5, Key: "/c/org/example/testns/svc1"},
+ {Host: "1.2.3.4", Port: 80, TTL: 5, Key: "/c/org/example/testns/svc1"},
},
},
{
@@ -52,7 +52,7 @@ func TestExternal(t *testing.T) {
k := New([]string{"cluster.local."})
k.APIConn = &external{}
k.Next = test.NextHandler(dns.RcodeSuccess, nil)
- k.Namespaces = map[string]struct{}{"testns": struct{}{}}
+ k.Namespaces = map[string]struct{}{"testns": {}}
for i, tc := range extCases {
state := testRequest(tc.Qname)
diff --git a/plugin/kubernetes/handler_test.go b/plugin/kubernetes/handler_test.go
index 8dbacbd14..956d611af 100644
--- a/plugin/kubernetes/handler_test.go
+++ b/plugin/kubernetes/handler_test.go
@@ -347,7 +347,7 @@ func TestServeDNS(t *testing.T) {
k := New([]string{"cluster.local."})
k.APIConn = &APIConnServeTest{}
k.Next = test.NextHandler(dns.RcodeSuccess, nil)
- k.Namespaces = map[string]struct{}{"testns": struct{}{}}
+ k.Namespaces = map[string]struct{}{"testns": {}}
ctx := context.TODO()
for i, tc := range dnsTestCases {
@@ -398,7 +398,7 @@ func TestNotSyncedServeDNS(t *testing.T) {
notSynced: true,
}
k.Next = test.NextHandler(dns.RcodeSuccess, nil)
- k.Namespaces = map[string]struct{}{"testns": struct{}{}}
+ k.Namespaces = map[string]struct{}{"testns": {}}
ctx := context.TODO()
for i, tc := range notSyncedTestCases {
diff --git a/plugin/kubernetes/xfr_test.go b/plugin/kubernetes/xfr_test.go
index 1fb3e0b43..4336194bd 100644
--- a/plugin/kubernetes/xfr_test.go
+++ b/plugin/kubernetes/xfr_test.go
@@ -15,7 +15,7 @@ func TestKubernetesXFR(t *testing.T) {
k := New([]string{"cluster.local."})
k.APIConn = &APIConnServeTest{}
k.TransferTo = []string{"10.240.0.1:53"}
- k.Namespaces = map[string]struct{}{"testns": struct{}{}}
+ k.Namespaces = map[string]struct{}{"testns": {}}
ctx := context.TODO()
w := dnstest.NewMultiRecorder(&test.ResponseWriter{})
@@ -103,7 +103,7 @@ func TestKubernetesXFRNotAllowed(t *testing.T) {
k := New([]string{"cluster.local."})
k.APIConn = &APIConnServeTest{}
k.TransferTo = []string{"1.2.3.4:53"}
- k.Namespaces = map[string]struct{}{"testns": struct{}{}}
+ k.Namespaces = map[string]struct{}{"testns": {}}
ctx := context.TODO()
w := dnstest.NewMultiRecorder(&test.ResponseWriter{})