summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@gmail.com>2020-03-30 07:07:04 +0900
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2020-03-30 07:07:04 +0900
commitec9cb7a1e44fe286d9d21f400761944e8c4ac0e7 (patch)
tree0e47f433b48de6c49100a7676c2a73af5928514e /pkg
parent750aa23633fa9f66cfa816b64077164668203564 (diff)
packet: silence staticcheck warning
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/packet/mrt/mrt.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/packet/mrt/mrt.go b/pkg/packet/mrt/mrt.go
index 377ce8ab..70788325 100644
--- a/pkg/packet/mrt/mrt.go
+++ b/pkg/packet/mrt/mrt.go
@@ -363,11 +363,11 @@ type RibEntry struct {
isAddPath bool
}
-var notAllRibEntryBytesAvailable = errors.New("not all RibEntry bytes are available")
+var errNotAllRibEntryBytesAvailable = errors.New("not all RibEntry bytes are available")
func (e *RibEntry) DecodeFromBytes(data []byte) ([]byte, error) {
if len(data) < 8 {
- return nil, notAllRibEntryBytesAvailable
+ return nil, errNotAllRibEntryBytesAvailable
}
e.PeerIndex = binary.BigEndian.Uint16(data[:2])
e.OriginatedTime = binary.BigEndian.Uint32(data[2:6])
@@ -390,7 +390,7 @@ func (e *RibEntry) DecodeFromBytes(data []byte) ([]byte, error) {
}
attrLen -= uint16(p.Len())
if len(data) < p.Len() {
- return nil, notAllRibEntryBytesAvailable
+ return nil, errNotAllRibEntryBytesAvailable
}
data = data[p.Len():]
e.PathAttributes = append(e.PathAttributes, p)