enable staticcheck linter

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2023-03-02 11:06:22 +01:00
committed by GitHub
parent d12b81dec5
commit 177e0bf2d9
8 changed files with 33 additions and 14 deletions

View File

@ -104,8 +104,6 @@ func getBandwidth(conf *PluginConf) *BandwidthEntry {
func validateRateAndBurst(rate, burst uint64) error {
switch {
case burst < 0 || rate < 0:
return fmt.Errorf("rate and burst must be a positive integer")
case burst == 0 && rate != 0:
return fmt.Errorf("if rate is set, burst must also be set")
case rate == 0 && burst != 0: