mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-09-17 01:45:27 +02:00
refactor: consolidate network interface detection logic
Move platform-specific network interface detection from cmd/cli/ to root package as ValidInterfaces function. This eliminates code duplication and provides a consistent interface for determining valid physical network interfaces across all platforms. - Remove duplicate validInterfacesMap functions from platform-specific files - Add context parameter to virtualInterfaces for proper logging - Update all callers to use ctrld.ValidInterfaces instead of local functions - Improve error handling in virtual interface detection on Linux
This commit is contained in:
@@ -444,7 +444,3 @@ func ValidInterfaces(ctx context.Context) map[string]struct{} {
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
func validInterfaces() map[string]struct{} {
|
||||
return ValidInterfaces(context.Background())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user