Closed kolyshkin closed 2 months ago
LGTM /approve @giuseppe @nalind @mtrmac @saschagrunert PTAL
Simplifying the Unix implementation, sure.
WRT removing the public
Utsname
symbol, c/storage is supposed to have a stable API, but with things like #1622 (and many others), that’s… not been consistently the case.
As I was not able to find any existing users of kernel.Utsname
, this API breakage seems purely theoretical.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: giuseppe, kolyshkin, rhatdan, saschagrunert
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Since golang.org/x/sys/unix provides portable way to use uname(2) syscall, let's use it for all unix variants, removing the duplicated code from uname_*.go.
While at it:
NOTE this also removes the public definition of struct Utsname. I am puzzled as to why it was exported as it is not (and was not) used by any public functions in this package, nor I was able to find any usage of kernel.Utsname (using sourcegraph).