dragonflyoss / Dragonfly2

Dragonfly is an open source P2P-based file distribution and image acceleration system. It is hosted by the Cloud Native Computing Foundation (CNCF) as an Incubating Level Project.
https://d7y.io
Apache License 2.0
2.1k stars 264 forks source link

fix: use safe set in client daemon network_topology.go #3276

Closed fcgxz2003 closed 1 month ago

fcgxz2003 commented 1 month ago

Use safe set in client daemon network_topology.go.

Related Issue

Motivation and Context

Screenshots (if appropriate)

Types of changes

Checklist

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 52.70%. Comparing base (1d96401) to head (786f835).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3276/graphs/tree.svg?width=650&height=150&src=pr&token=PUICJYSAT7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss)](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3276?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) ```diff @@ Coverage Diff @@ ## main #3276 +/- ## ========================================== - Coverage 52.71% 52.70% -0.01% ========================================== Files 192 192 Lines 20388 20388 ========================================== - Hits 10748 10746 -2 - Misses 8833 8837 +4 + Partials 807 805 -2 ``` | [Flag](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3276/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3276/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) | `52.70% <100.00%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3276?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) | Coverage Δ | | |---|---|---| | [client/daemon/networktopology/network\_topology.go](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3276?src=pr&el=tree&filepath=client%2Fdaemon%2Fnetworktopology%2Fnetwork_topology.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-Y2xpZW50L2RhZW1vbi9uZXR3b3JrdG9wb2xvZ3kvbmV0d29ya190b3BvbG9neS5nbw==) | `100.00% <100.00%> (ø)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3276/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss)