diff options
author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2020-03-02 10:14:49 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2020-03-02 10:15:56 +0900 |
commit | 15eb09ccd012c412794e08da117397f1f1aab92d (patch) | |
tree | a8e70cfec05ba346ffdcd89b11ea6d48d348e5f0 /pkg | |
parent | 659ef4bc371c5b99496ace901c380e5956b146b2 (diff) |
bgp: silence statickcheck errors
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/packet/bgp/bgp.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/packet/bgp/bgp.go b/pkg/packet/bgp/bgp.go index a6e0fd15..37e90107 100644 --- a/pkg/packet/bgp/bgp.go +++ b/pkg/packet/bgp/bgp.go @@ -2839,7 +2839,7 @@ func (er *EVPNIPPrefixRoute) Serialize() ([]byte, error) { buf[22] = er.IPPrefixLength if er.IPPrefix == nil { - return nil, NewMessageError(BGP_ERROR_UPDATE_MESSAGE_ERROR, BGP_ERROR_SUB_MALFORMED_ATTRIBUTE_LIST, nil, fmt.Sprintf("IP Prefix is nil")) + return nil, NewMessageError(BGP_ERROR_UPDATE_MESSAGE_ERROR, BGP_ERROR_SUB_MALFORMED_ATTRIBUTE_LIST, nil, "IP Prefix is nil") } else if er.IPPrefix.To4() != nil { buf = append(buf, er.IPPrefix.To4()...) if er.GWIPAddress == nil { @@ -2935,7 +2935,7 @@ func (er *EVPNIPMSIRoute) DecodeFromBytes(data []byte) error { data = data[4:] ec, err := ParseExtended(data[0:8]) if err != nil { - return NewMessageError(BGP_ERROR_UPDATE_MESSAGE_ERROR, BGP_ERROR_SUB_MALFORMED_ATTRIBUTE_LIST, nil, fmt.Sprintf("Parse extended community interface failed")) + return NewMessageError(BGP_ERROR_UPDATE_MESSAGE_ERROR, BGP_ERROR_SUB_MALFORMED_ATTRIBUTE_LIST, nil, "Parse extended community interface failed") } er.EC = ec return nil @@ -7713,7 +7713,7 @@ func (l *LsAddrPrefix) MarshalJSON() ([]byte, error) { func (l *LsAddrPrefix) String() string { if l.NLRI == nil { - return fmt.Sprintf("NLRI: (nil)") + return "NLRI: (nil)" } return fmt.Sprintf("NLRI { %v }", l.NLRI.String()) @@ -11474,7 +11474,7 @@ func (t *TunnelEncapTLV) DecodeFromBytes(data []byte) error { t.Length = binary.BigEndian.Uint16(data[2:4]) data = data[4:] if len(data) < int(t.Length) { - return NewMessageError(BGP_ERROR_UPDATE_MESSAGE_ERROR, BGP_ERROR_SUB_MALFORMED_ATTRIBUTE_LIST, nil, fmt.Sprintf("Not all TunnelEncapTLV bytes available")) + return NewMessageError(BGP_ERROR_UPDATE_MESSAGE_ERROR, BGP_ERROR_SUB_MALFORMED_ATTRIBUTE_LIST, nil, "Not all TunnelEncapTLV bytes available") } value := data[:t.Length] for len(value) > 2 { |