status-go/vendor/github.com/tklauser/go-sysconf
Andrea Maria Piana 2f539d3bd2 Upgrade go-ens
Go ens needs to be updated to be compatible with the lastest geth
version
2021-07-20 10:57:38 +02:00
..
.cirrus.yml Upgrade go-ens 2021-07-20 10:57:38 +02:00
.gitignore Upgrade go-ens 2021-07-20 10:57:38 +02:00
LICENSE Upgrade go-ens 2021-07-20 10:57:38 +02:00
README.md Upgrade go-ens 2021-07-20 10:57:38 +02:00
go.mod Upgrade go-ens 2021-07-20 10:57:38 +02:00
go.sum Upgrade go-ens 2021-07-20 10:57:38 +02:00
sysconf.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
sysconf_bsd.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
sysconf_darwin.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
sysconf_dragonfly.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
sysconf_freebsd.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
sysconf_generic.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
sysconf_linux.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
sysconf_netbsd.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
sysconf_openbsd.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
sysconf_posix.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
sysconf_solaris.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
sysconf_unsupported.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_defs_darwin.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_defs_dragonfly.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_defs_freebsd.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_defs_linux.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_defs_netbsd.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_defs_openbsd.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_defs_solaris.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_values_freebsd_386.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_values_freebsd_amd64.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_values_freebsd_arm.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_values_freebsd_arm64.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_values_linux_386.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_values_linux_amd64.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_values_linux_arm.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_values_linux_arm64.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_values_linux_mips.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_values_linux_mips64.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_values_linux_mips64le.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_values_linux_mipsle.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_values_linux_ppc64.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_values_linux_ppc64le.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_values_linux_riscv64.go Upgrade go-ens 2021-07-20 10:57:38 +02:00
zsysconf_values_linux_s390x.go Upgrade go-ens 2021-07-20 10:57:38 +02:00

README.md

go-sysconf

Go Reference GitHub Action Status Go Report Card

sysconf for Go, without using cgo or external binaries (e.g. getconf).

Supported operating systems: Linux, Darwin, DragonflyBSD, FreeBSD, NetBSD, OpenBSD, Solaris.

All POSIX.1 and POSIX.2 variables are supported, see References for a complete list.

Additionally, the following non-standard variables are supported on some operating systems:

Variable Supported on
SC_PHYS_PAGES Linux, Darwin, FreeBSD, NetBSD, OpenBSD, Solaris
SC_AVPHYS_PAGES Linux, OpenBSD, Solaris
SC_NPROCESSORS_CONF Linux, Darwin, FreeBSD, NetBSD, OpenBSD, Solaris
SC_NPROCESSORS_ONLN Linux, Darwin, FreeBSD, NetBSD, OpenBSD, Solaris
SC_UIO_MAXIOV Linux

Usage

package main

import (
	"fmt"

	"github.com/tklauser/go-sysconf"
)

func main() {
	// get clock ticks, this will return the same as C.sysconf(C._SC_CLK_TCK)
	clktck, err := sysconf.Sysconf(sysconf.SC_CLK_TCK)
	if err == nil {
		fmt.Printf("SC_CLK_TCK: %v\n", clktck)
	}
}

References