refactor(sysctl): consolidate platform-specific syscall files #1071
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
syscall_linux.go
tosyscall.go
with build constraints for non-BSD and non-Windows platforms.syscall_darwin.go
intosyscall_bsd.go
and adjust build constraints for BSD platforms (Darwin, FreeBSD, OpenBSD).syscall_freebsd.go
.syscall_windows.go
for Windows platform.device_freebsd.go
todevice_bsd.go
andhardware_freebsd.go
tohardware_bsd.go
to reflect broader BSD support (FreeBSD, NetBSD, OpenBSD, Dragonfly).device_bsd.go
andhardware_bsd.go
to include FreeBSD, NetBSD, OpenBSD, and Dragonfly.device_linux.go
todevice_unix.go
andhardware_linux.go
tohardware_unix.go
to generalize Unix support excluding Darwin-based systems and BSDs.device_darwin.go
,device_unix.go
,hardware_darwin.go
, andhardware_unix.go
to correctly target their respective operating systems.device_windows.go
andhardware_windows.go
) are correctly tagged for building on Windows.The main point of the changes: the ability to build a project for any POSIX-compatible system, not limited to a {linux,darwin,windows,freebsd} list