mirror of
https://github.com/openfaas/faas.git
synced 2025-06-18 03:56:37 +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/swaps.go
generated
vendored
8
gateway/vendor/github.com/prometheus/procfs/swaps.go
generated
vendored
@ -64,7 +64,7 @@ func parseSwapString(swapString string) (*Swap, error) {
|
||||
swapFields := strings.Fields(swapString)
|
||||
swapLength := len(swapFields)
|
||||
if swapLength < 5 {
|
||||
return nil, fmt.Errorf("too few fields in swap string: %s", swapString)
|
||||
return nil, fmt.Errorf("%w: too few fields in swap string: %s", ErrFileParse, swapString)
|
||||
}
|
||||
|
||||
swap := &Swap{
|
||||
@ -74,15 +74,15 @@ func parseSwapString(swapString string) (*Swap, error) {
|
||||
|
||||
swap.Size, err = strconv.Atoi(swapFields[2])
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid swap size: %s", swapFields[2])
|
||||
return nil, fmt.Errorf("%s: invalid swap size: %s: %w", ErrFileParse, swapFields[2], err)
|
||||
}
|
||||
swap.Used, err = strconv.Atoi(swapFields[3])
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid swap used: %s", swapFields[3])
|
||||
return nil, fmt.Errorf("%s: invalid swap used: %s: %w", ErrFileParse, swapFields[3], err)
|
||||
}
|
||||
swap.Priority, err = strconv.Atoi(swapFields[4])
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid swap priority: %s", swapFields[4])
|
||||
return nil, fmt.Errorf("%s: invalid swap priority: %s: %w", ErrFileParse, swapFields[4], err)
|
||||
}
|
||||
|
||||
return swap, nil
|
||||
|
Reference in New Issue
Block a user