unix: use sort.Search for sysctl lookup on OpenBSD
Use sort.Search to look up sysctl mib values from names instead of using a hand-crafted binary search. Also add a simple test to verify sysctl is still working after the change. Change-Id: I844840ac434a704b14c3166c3730daffabd2f347 Reviewed-on: https://go-review.googlesource.com/76930 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Showing
Please
register
or
sign in
to comment