mirror of https://github.com/docker/cli.git
opts/throttledevice.go:51:5: SA4003: unsigned values are never < 0 (staticcheck)
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
ab255f13b7
commit
296297190c
|
@ -48,9 +48,6 @@ func ValidateThrottleIOpsDevice(val string) (*blkiodev.ThrottleDevice, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("invalid rate for device: %s. The correct format is <device-path>:<number>. Number must be a positive integer", val)
|
return nil, fmt.Errorf("invalid rate for device: %s. The correct format is <device-path>:<number>. Number must be a positive integer", val)
|
||||||
}
|
}
|
||||||
if rate < 0 {
|
|
||||||
return nil, fmt.Errorf("invalid rate for device: %s. The correct format is <device-path>:<number>. Number must be a positive integer", val)
|
|
||||||
}
|
|
||||||
|
|
||||||
return &blkiodev.ThrottleDevice{Path: split[0], Rate: rate}, nil
|
return &blkiodev.ThrottleDevice{Path: split[0], Rate: rate}, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue