From 20e7443037f701256dd596759f536f10f6653644 Mon Sep 17 00:00:00 2001 From: "red-hat-konflux[bot]" <126015336+red-hat-konflux[bot]@users.noreply.github.com> Date: Tue, 25 Nov 2025 09:42:59 +0000 Subject: [PATCH] chore(deps): update module github.com/tklauser/go-sysconf to v0.3.16 Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- .../tklauser/go-sysconf/.cirrus.yml | 2 +- .../tklauser/go-sysconf/sysconf_netbsd.go | 20 ++++++++----------- .../github.com/tklauser/numcpus/.cirrus.yml | 2 +- .../tklauser/numcpus/numcpus_linux.go | 10 +++++++--- vendor/modules.txt | 8 ++++---- 7 files changed, 27 insertions(+), 27 deletions(-) diff --git a/go.mod b/go.mod index f1609a207..21fe9339c 100644 --- a/go.mod +++ b/go.mod @@ -153,8 +153,8 @@ require ( github.com/spf13/cast v1.7.1 // indirect github.com/spf13/cobra v1.9.1 // indirect github.com/spf13/pflag v1.0.10 // indirect - github.com/tklauser/go-sysconf v0.3.15 // indirect - github.com/tklauser/numcpus v0.10.0 // indirect + github.com/tklauser/go-sysconf v0.3.16 // indirect + github.com/tklauser/numcpus v0.11.0 // indirect github.com/vmihailenco/go-tinylfu v0.2.2 // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect diff --git a/go.sum b/go.sum index 37818683e..25956e5d7 100644 --- a/go.sum +++ b/go.sum @@ -463,11 +463,11 @@ github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhso github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= -github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4= -github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4= +github.com/tklauser/go-sysconf v0.3.16 h1:frioLaCQSsF5Cy1jgRBrzr6t502KIIwQ0MArYICU0nA= +github.com/tklauser/go-sysconf v0.3.16/go.mod h1:/qNL9xxDhc7tx3HSRsLWNnuzbVfh3e7gh/BmM179nYI= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= -github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso= -github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ= +github.com/tklauser/numcpus v0.11.0 h1:nSTwhKH5e1dMNsCdVBukSZrURJRoHbSEQjdEbY+9RXw= +github.com/tklauser/numcpus v0.11.0/go.mod h1:z+LwcLq54uWZTX0u/bGobaV34u6V7KNlTZejzM6/3MQ= github.com/vmihailenco/go-tinylfu v0.2.2 h1:H1eiG6HM36iniK6+21n9LLpzx1G9R3DJa2UjUjbynsI= github.com/vmihailenco/go-tinylfu v0.2.2/go.mod h1:CutYi2Q9puTxfcolkliPq4npPuofg9N9t8JVrjzwa3Q= github.com/vmihailenco/msgpack/v5 v5.3.4/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= diff --git a/vendor/github.com/tklauser/go-sysconf/.cirrus.yml b/vendor/github.com/tklauser/go-sysconf/.cirrus.yml index 495e5e633..61724abec 100644 --- a/vendor/github.com/tklauser/go-sysconf/.cirrus.yml +++ b/vendor/github.com/tklauser/go-sysconf/.cirrus.yml @@ -1,6 +1,6 @@ env: CIRRUS_CLONE_DEPTH: 1 - GO_VERSION: go1.24.0 + GO_VERSION: go1.25.0 freebsd_13_task: freebsd_instance: diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_netbsd.go b/vendor/github.com/tklauser/go-sysconf/sysconf_netbsd.go index 40f6c345f..87cf6a10a 100644 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_netbsd.go +++ b/vendor/github.com/tklauser/go-sysconf/sysconf_netbsd.go @@ -25,10 +25,13 @@ const ( _POSIX2_UPE = -1 ) -var clktck struct { - sync.Once - v int64 -} +var clktck = sync.OnceValue(func() int64 { + ci, err := unix.SysctlClockinfo("kern.clockrate") + if err != nil { + return -1 + } + return int64(ci.Hz) +}) func sysconfPOSIX(name int) (int64, error) { // NetBSD does not define all _POSIX_* values used in sysconf_posix.go @@ -54,14 +57,7 @@ func sysconf(name int) (int64, error) { } return -1, nil case SC_CLK_TCK: - // TODO: use sync.OnceValue once Go 1.21 is the minimal supported version - clktck.Do(func() { - clktck.v = -1 - if ci, err := unix.SysctlClockinfo("kern.clockrate"); err == nil { - clktck.v = int64(ci.Hz) - } - }) - return clktck.v, nil + return clktck(), nil case SC_NGROUPS_MAX: return sysctl32("kern.ngroups"), nil case SC_JOB_CONTROL: diff --git a/vendor/github.com/tklauser/numcpus/.cirrus.yml b/vendor/github.com/tklauser/numcpus/.cirrus.yml index 495e5e633..61724abec 100644 --- a/vendor/github.com/tklauser/numcpus/.cirrus.yml +++ b/vendor/github.com/tklauser/numcpus/.cirrus.yml @@ -1,6 +1,6 @@ env: CIRRUS_CLONE_DEPTH: 1 - GO_VERSION: go1.24.0 + GO_VERSION: go1.25.0 freebsd_13_task: freebsd_instance: diff --git a/vendor/github.com/tklauser/numcpus/numcpus_linux.go b/vendor/github.com/tklauser/numcpus/numcpus_linux.go index 7b991da46..d05ee9825 100644 --- a/vendor/github.com/tklauser/numcpus/numcpus_linux.go +++ b/vendor/github.com/tklauser/numcpus/numcpus_linux.go @@ -47,10 +47,12 @@ func readCPURangeWith[T any](file string, f func(cpus string) (T, error)) (T, er if err != nil { return zero, err } - return f(strings.Trim(string(buf), "\n ")) + return f(string(buf)) } func countCPURange(cpus string) (int, error) { + cpus = strings.Trim(cpus, "\n ") + // Treat empty file as valid. This might be the case if there are no offline CPUs in which // case /sys/devices/system/cpu/offline is empty. if cpus == "" { @@ -58,7 +60,7 @@ func countCPURange(cpus string) (int, error) { } n := int(0) - for _, cpuRange := range strings.Split(cpus, ",") { + for cpuRange := range strings.SplitSeq(cpus, ",") { if cpuRange == "" { return 0, fmt.Errorf("empty CPU range in CPU string %q", cpus) } @@ -84,13 +86,15 @@ func countCPURange(cpus string) (int, error) { } func listCPURange(cpus string) ([]int, error) { + cpus = strings.Trim(cpus, "\n ") + // See comment in countCPURange. if cpus == "" { return []int{}, nil } list := []int{} - for _, cpuRange := range strings.Split(cpus, ",") { + for cpuRange := range strings.SplitSeq(cpus, ",") { if cpuRange == "" { return nil, fmt.Errorf("empty CPU range in CPU string %q", cpus) } diff --git a/vendor/modules.txt b/vendor/modules.txt index 5dc7ed61e..997ec4037 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -758,11 +758,11 @@ github.com/spf13/cobra # github.com/spf13/pflag v1.0.10 ## explicit; go 1.12 github.com/spf13/pflag -# github.com/tklauser/go-sysconf v0.3.15 -## explicit; go 1.23.0 +# github.com/tklauser/go-sysconf v0.3.16 +## explicit; go 1.24.0 github.com/tklauser/go-sysconf -# github.com/tklauser/numcpus v0.10.0 -## explicit; go 1.23.0 +# github.com/tklauser/numcpus v0.11.0 +## explicit; go 1.24.0 github.com/tklauser/numcpus # github.com/vmihailenco/go-tinylfu v0.2.2 ## explicit; go 1.15