mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to master@ae9d0f5
Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
8
vendor/github.com/prometheus/procfs/netstat.go
generated
vendored
8
vendor/github.com/prometheus/procfs/netstat.go
generated
vendored
@ -21,13 +21,13 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// NetStat contains statistics for all the counters from one file
|
||||
// NetStat contains statistics for all the counters from one file.
|
||||
type NetStat struct {
|
||||
Filename string
|
||||
Stats map[string][]uint64
|
||||
Filename string
|
||||
}
|
||||
|
||||
// NetStat retrieves stats from /proc/net/stat/
|
||||
// NetStat retrieves stats from `/proc/net/stat/`.
|
||||
func (fs FS) NetStat() ([]NetStat, error) {
|
||||
statFiles, err := filepath.Glob(fs.proc.Path("net/stat/*"))
|
||||
if err != nil {
|
||||
@ -55,7 +55,7 @@ func (fs FS) NetStat() ([]NetStat, error) {
|
||||
// Other strings represent per-CPU counters
|
||||
for scanner.Scan() {
|
||||
for num, counter := range strings.Fields(scanner.Text()) {
|
||||
value, err := strconv.ParseUint(counter, 16, 32)
|
||||
value, err := strconv.ParseUint(counter, 16, 64)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user