diff options
author | Eiichiro Watanabe <a16tochjp@gmail.com> | 2015-10-19 14:19:53 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-10-21 14:20:05 +0900 |
commit | f561312ceb92e85f0aa89b5c92cb04f0bb97f389 (patch) | |
tree | e0c5e0038114863e4ca87d98aa139354b9fe73a7 | |
parent | 421b9284ccd2efaff4d5659b78740da53d154102 (diff) |
packet: use %v instead of %s
-rw-r--r-- | packet/mrt.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packet/mrt.go b/packet/mrt.go index ba7dfa06..7c336684 100644 --- a/packet/mrt.go +++ b/packet/mrt.go @@ -700,7 +700,7 @@ func (m *BGP4MPMessage) String() string { if m.isLocal { title += "_LOCAL" } - return fmt.Sprintf("%s: PeerAS [%d] LocalAS [%d] InterfaceIndex [%d] PeerIP [%s] LocalIP [%s] BGPMessage [%s]", title, m.PeerAS, m.LocalAS, m.InterfaceIndex, m.PeerIpAddress, m.LocalIpAddress, m.BGPMessage.String()) + return fmt.Sprintf("%s: PeerAS [%d] LocalAS [%d] InterfaceIndex [%d] PeerIP [%s] LocalIP [%s] BGPMessage [%v]", title, m.PeerAS, m.LocalAS, m.InterfaceIndex, m.PeerIpAddress, m.LocalIpAddress, m.BGPMessage) } //This function can be passed into a bufio.Scanner.Split() to read buffered mrt msgs @@ -746,7 +746,7 @@ func ParseMRTBody(h *MRTHeader, data []byte) (*MRTMessage, error) { rf = RF_IPv6_MC case RIB_GENERIC: default: - return nil, fmt.Errorf("unsupported table dumpv2 subtype: %s\n", subType.String()) + return nil, fmt.Errorf("unsupported table dumpv2 subtype: %v\n", subType) } if subType != PEER_INDEX_TABLE { @@ -781,10 +781,10 @@ func ParseMRTBody(h *MRTHeader, data []byte) (*MRTMessage, error) { isLocal: true, } default: - return nil, fmt.Errorf("unsupported bgp4mp subtype: %s\n", subType.String()) + return nil, fmt.Errorf("unsupported bgp4mp subtype: %v\n", subType) } default: - return nil, fmt.Errorf("unsupported type: %s\n", h.Type.String()) + return nil, fmt.Errorf("unsupported type: %v\n", h.Type) } err := msg.Body.DecodeFromBytes(data) if err != nil { |