Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

map bool -> map struct{} #2386

Merged
merged 1 commit into from
Dec 10, 2018
Merged

map bool -> map struct{} #2386

merged 1 commit into from
Dec 10, 2018

Conversation

miekg
Copy link
Member

@miekg miekg commented Dec 10, 2018

This clears out the remaining map[x]bool usage and moves the bool to an
empty struct.

Nothing really in the serving path, so the saving are minimal, but good form to not use more than you need.

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 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>
@miekg miekg requested a review from yongtang December 10, 2018 07:53
@codecov-io
Copy link

Codecov Report

Merging #2386 into master will increase coverage by <.01%.
The diff coverage is 84.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2386      +/-   ##
==========================================
+ Coverage   55.98%   55.99%   +<.01%     
==========================================
  Files         203      203              
  Lines       10189    10191       +2     
==========================================
+ Hits         5704     5706       +2     
  Misses       4050     4050              
  Partials      435      435
Impacted Files Coverage Δ
coremain/run.go 31.3% <ø> (ø) ⬆️
core/dnsserver/server.go 14.81% <0%> (ø) ⬆️
plugin/log/log.go 76.92% <100%> (+1.92%) ⬆️
plugin/metrics/metrics.go 72% <100%> (ø) ⬆️
plugin/log/setup.go 86.44% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c788649...67be9eb. Read the comment docs.

Copy link
Member

@yongtang yongtang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

@yongtang yongtang merged commit 9abbf4a into master Dec 10, 2018
@corbot corbot bot deleted the maps branch December 10, 2018 10:17
Jason-ZW pushed a commit to rancher/coredns that referenced this pull request Apr 17, 2019
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>
dna2github pushed a commit to dna2fork/coredns that referenced this pull request Jul 19, 2019
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants