mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 18:53:43 -04:00
map bool -> map struct{} (#2386)
This clear out the remaining map[x]bool usage and moves the bool to an empty struct. Two note worthy other changes: * EnableChaos in the server is now also exported to make it show up in the documentation. * The auto plugin is left as is, because there the boolean is explicitaly set to false to signal 'to-be-deleted' and the key is left as-is. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -21,7 +21,7 @@ func TestLoggedStatus(t *testing.T) {
|
||||
rule := Rule{
|
||||
NameScope: ".",
|
||||
Format: DefaultLogFormat,
|
||||
Class: map[response.Class]bool{response.All: true},
|
||||
Class: map[response.Class]struct{}{response.All: struct{}{}},
|
||||
}
|
||||
|
||||
var f bytes.Buffer
|
||||
@@ -53,7 +53,7 @@ func TestLoggedClassDenial(t *testing.T) {
|
||||
rule := Rule{
|
||||
NameScope: ".",
|
||||
Format: DefaultLogFormat,
|
||||
Class: map[response.Class]bool{response.Denial: true},
|
||||
Class: map[response.Class]struct{}{response.Denial: struct{}{}},
|
||||
}
|
||||
|
||||
var f bytes.Buffer
|
||||
@@ -82,7 +82,7 @@ func TestLoggedClassError(t *testing.T) {
|
||||
rule := Rule{
|
||||
NameScope: ".",
|
||||
Format: DefaultLogFormat,
|
||||
Class: map[response.Class]bool{response.Error: true},
|
||||
Class: map[response.Class]struct{}{response.Error: struct{}{}},
|
||||
}
|
||||
|
||||
var f bytes.Buffer
|
||||
|
||||
Reference in New Issue
Block a user