mirror of
https://github.com/coredns/coredns.git
synced 2025-11-09 13:32:16 -05:00
plugin/kubernetes: smaller map (#2383)
* plugin/kubernetes: smaller map
to continue with a theme: the map[string]bool can be reduced
to map[string]struct{} to reduce a tiny amount of memory.
Signed-off-by: Miek Gieben <miek@miek.nl>
* fix tests
Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -16,7 +16,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]bool{"testns": true}
|
||||
k.Namespaces = map[string]struct{}{"testns": struct{}{}}
|
||||
|
||||
ctx := context.TODO()
|
||||
w := dnstest.NewMultiRecorder(&test.ResponseWriter{})
|
||||
@@ -104,7 +104,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]bool{"testns": true}
|
||||
k.Namespaces = map[string]struct{}{"testns": struct{}{}}
|
||||
|
||||
ctx := context.TODO()
|
||||
w := dnstest.NewMultiRecorder(&test.ResponseWriter{})
|
||||
|
||||
Reference in New Issue
Block a user