Package sysctl inspired by systemd's sysctl source code and kubernetes's sysctl subpackage.
go get github.com/go-laeo/sysctl
// disables all ipv6
sysctl.Set("net.ipv6.conf.all.disable_ipv6", "1")
// check if ipv6 has disabled
disabled, err := sysctl.GetBool("net.ipv6.conf.all.disable_ipv6")
The MIT License.