This section will present a small portion of the functionality of the syscall standard Go package. Note that the syscall package offers a plethora of functions and types related to low-level operating system primitives. Additionally, the syscall package is extensively used by other Go packages, such as os, net, and time, which all provide a portable interface to the operating system. This means that the syscall package is not the most portable package in the Go library – that is not its job.
Although UNIX systems have many similarities, they also exhibit various differences, especially when we talk about their system internals. The job of the syscall package is to deal with all of these incompatibilities as gently as possible. The fact that this is not a secret and is well documented makes syscall a successful package.
Strictly speaking, a system call...