Commit 282b91c
authored
Split networkv2 into common + per-OS files (#54509)
<!--Please give us some feedback on your experience writing this PR ! https://app.datadoghq.com/forms/43db4c02-6837-400c-8083-692e141b1b88 !-->
### What does this PR do?
Refactors the v2 Go network check (`networkv2`) so the pieces genuinely shared across platforms (check scaffolding, `Factory`, `Configure` boilerplate, basic interface metrics, device-exclusion check) live in `network.go`, with `network_linux.go` / `network_windows.go` holding only what's actually OS-specific.
### Motivation
Pure code-organization cleanup: removes ~150 lines of near-identical boilerplate that was duplicated per platform, and paves the way for adding AIX support (as a `network_aix.go` reusing this shared base) in a follow-up PR without a third copy of that scaffolding.
### Describe how you validated your changes
CI
### Additional Notes
Just moving code, no expected impact.
Co-authored-by: pierre.gimalac <pierre.gimalac@datadoghq.com>1 parent 9c12327 commit 282b91c
5 files changed
Lines changed: 982 additions & 994 deletions
File tree
- pkg/collector/corechecks/net/networkv2
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
File renamed without changes.
0 commit comments