Skip to content

Commit f6958ed

Browse files
committed
refactor(network): move UnknownNumaNode constant to common file
Move the UnknownNumaNode constant from network_linux.go to network.go to make it available across all platforms and avoid duplication
1 parent 230dd6a commit f6958ed

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/util/machine/network.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ const (
4646
NicDriverUnknown NicDriver = "unknown"
4747
)
4848

49+
const UnknownNumaNode = -1
50+
4951
type ExtraNetworkInfo struct {
5052
// Interface info list of all network interface.
5153
Interface []InterfaceInfo

pkg/util/machine/network_linux.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ const (
8181
SoftIrqsFile = "/proc/softirqs"
8282
)
8383

84-
const UnknownNumaNode = -1
85-
8684
var netnsMutex sync.Mutex
8785

8886
// GetExtraNetworkInfo collects network interface information from /sys/class/net and net.Interfaces.

0 commit comments

Comments
 (0)