From ec9cb7a1e44fe286d9d21f400761944e8c4ac0e7 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Mon, 30 Mar 2020 07:07:04 +0900 Subject: packet: silence staticcheck warning Signed-off-by: FUJITA Tomonori --- pkg/packet/mrt/mrt.go | 6 +++--- 1 file 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) -- cgit v1.2.3