mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04: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:
@@ -187,7 +187,7 @@ func ParseStanza(c *caddy.Controller) (*Kubernetes, error) {
|
||||
args := c.RemainingArgs()
|
||||
if len(args) > 0 {
|
||||
for _, a := range args {
|
||||
k8s.Namespaces[a] = true
|
||||
k8s.Namespaces[a] = struct{}{}
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user