mirror of
https://github.com/openfaas/faas.git
synced 2025-06-20 13:06:40 +00:00
Rename Makefile targets
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
This commit is contained in:
8
gateway/vendor/github.com/prometheus/procfs/proc_cgroups.go
generated
vendored
8
gateway/vendor/github.com/prometheus/procfs/proc_cgroups.go
generated
vendored
@ -46,7 +46,7 @@ func parseCgroupSummaryString(CgroupSummaryStr string) (*CgroupSummary, error) {
|
||||
fields := strings.Fields(CgroupSummaryStr)
|
||||
// require at least 4 fields
|
||||
if len(fields) < 4 {
|
||||
return nil, fmt.Errorf("at least 4 fields required, found %d fields in cgroup info string: %s", len(fields), CgroupSummaryStr)
|
||||
return nil, fmt.Errorf("%w: 4+ fields required, found %d fields in cgroup info string: %s", ErrFileParse, len(fields), CgroupSummaryStr)
|
||||
}
|
||||
|
||||
CgroupSummary := &CgroupSummary{
|
||||
@ -54,15 +54,15 @@ func parseCgroupSummaryString(CgroupSummaryStr string) (*CgroupSummary, error) {
|
||||
}
|
||||
CgroupSummary.Hierarchy, err = strconv.Atoi(fields[1])
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to parse hierarchy ID")
|
||||
return nil, fmt.Errorf("%w: Unable to parse hierarchy ID from %q", ErrFileParse, fields[1])
|
||||
}
|
||||
CgroupSummary.Cgroups, err = strconv.Atoi(fields[2])
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to parse Cgroup Num")
|
||||
return nil, fmt.Errorf("%w: Unable to parse Cgroup Num from %q", ErrFileParse, fields[2])
|
||||
}
|
||||
CgroupSummary.Enabled, err = strconv.Atoi(fields[3])
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to parse Enabled")
|
||||
return nil, fmt.Errorf("%w: Unable to parse Enabled from %q", ErrFileParse, fields[3])
|
||||
}
|
||||
return CgroupSummary, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user