[VOL-3285] Resolving statis code analysis warnings
Change-Id: Iaddaae92c649fd27ce0a63f1786af594667c9e8e
diff --git a/internal/bbsim/devices/pon.go b/internal/bbsim/devices/pon.go
index 225a45f..54301fa 100644
--- a/internal/bbsim/devices/pon.go
+++ b/internal/bbsim/devices/pon.go
@@ -18,7 +18,6 @@
import (
"bytes"
- "errors"
"fmt"
"github.com/looplab/fsm"
@@ -163,7 +162,7 @@
return onu, nil
}
}
- return nil, errors.New(fmt.Sprintf("Cannot find Onu with serial number %d in PonPort %d", sn, p.ID))
+ return nil, fmt.Errorf("Cannot find Onu with serial number %d in PonPort %d", sn, p.ID)
}
func (p PonPort) GetOnuById(id uint32) (*Onu, error) {
@@ -172,7 +171,7 @@
return onu, nil
}
}
- return nil, errors.New(fmt.Sprintf("Cannot find Onu with id %d in PonPort %d", id, p.ID))
+ return nil, fmt.Errorf("Cannot find Onu with id %d in PonPort %d", id, p.ID)
}
// GetNumOfActiveOnus returns number of active ONUs for PON port