dragonflyoss / Dragonfly

This repository has be archived and moved to the new repository https://github.com/dragonflyoss/Dragonfly2.
https://d7y.io
Apache License 2.0
6k stars 774 forks source link

Update netutils.go #1561

Open guoguodan opened 3 years ago

guoguodan commented 3 years ago

add param check,it may be null pointer

guoguodan commented 3 years ago

add param check,it may be null pointer

codecov-commenter commented 3 years ago

Codecov Report

Merging #1561 (39e1e0b) into master (d2a749a) will increase coverage by 1.62%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1561      +/-   ##
==========================================
+ Coverage   49.16%   50.79%   +1.62%     
==========================================
  Files         145      145              
  Lines        8408     9592    +1184     
==========================================
+ Hits         4134     4872     +738     
- Misses       3887     4323     +436     
- Partials      387      397      +10     
Impacted Files Coverage Δ
pkg/netutils/netutils.go 55.33% <0.00%> (+2.62%) :arrow_up:
supernode/server/api/api.go 85.18% <0.00%> (-4.29%) :arrow_down:
dfget/locator/manager.go 69.23% <0.00%> (-3.50%) :arrow_down:
supernode/daemon/mgr/preheat/base_worker.go 18.60% <0.00%> (-1.99%) :arrow_down:
dfget/config/supernode_value.go 64.15% <0.00%> (-1.74%) :arrow_down:
supernode/store/errors.go 73.33% <0.00%> (-1.67%) :arrow_down:
dfget/core/api/download_api.go 30.23% <0.00%> (-1.35%) :arrow_down:
dfget/types/pull_piece_task_response.go 85.71% <0.00%> (-1.25%) :arrow_down:
cmd/dfget/app/root.go 71.34% <0.00%> (-1.03%) :arrow_down:
supernode/config/config.go 93.75% <0.00%> (-0.99%) :arrow_down:
... and 136 more

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 d2a749a...39e1e0b. Read the comment docs.