diff options
| author | Kir Kolyshkin <kolyshkin@gmail.com> | 2022-08-18 13:43:47 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-09-03 18:39:45 +0000 |
| commit | a73506cff560c4d95ac604f4f76d58386ca29ed9 (patch) | |
| tree | 3a923b1fcbd3c3f24ccb495bb434c20b3b312024 /src/runtime/export_debug_test.go | |
| parent | 2392b7061cfc71dcdaefeb027dcce0951f697658 (diff) | |
| download | go-a73506cff560c4d95ac604f4f76d58386ca29ed9.tar.xz | |
internal/syscall/unix: consolidate kernelVersion implementations
Currently, there are 3 functions returning Linux kernel version numbers.
Two of them are identical:
- in net, initially added by commit 0a9dd47dd817904e;
- in internal/poll, initially added by commit 1c7650aa93bd53;
(both were later fixed by commit 66c02645062561a).
The third one is a more complex, regexp-based implementation in
runtime/pprof, which is only used for a test.
Instead of adding one more, let's consolidate existing ones.
Remove the complex implementation, and move the simple one into
internal/syscall/unix. Use it from all the three places mentioned above.
Change-Id: I4a34d9ca47257743c16def30e4dd634e36056091
Reviewed-on: https://go-review.googlesource.com/c/go/+/424896
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Kirill Kolyshkin <kolyshkin@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/export_debug_test.go')
0 files changed, 0 insertions, 0 deletions
