diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-11-20 13:28:25 +0900 |
---|---|---|
committer | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-11-20 13:51:27 +0900 |
commit | 0564b24aef48f5821e97055d1b1e6eef5b73d14e (patch) | |
tree | 73ca853476ed9fa2924ac8cc7483f3dec93ec093 /packet/bgp/helper.go | |
parent | 19858453d73bf6fb38eedac96e82a23f2d3632e5 (diff) |
packet/bgp: Rename snake case to camel case
This patch renames some variable names in snake case (e.g.,
"last_byte_value") to that in the camel case (e.g., "lastByte")
because Go prefers the camel case for variable names.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'packet/bgp/helper.go')
-rw-r--r-- | packet/bgp/helper.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/packet/bgp/helper.go b/packet/bgp/helper.go index d97095f9..1061d915 100644 --- a/packet/bgp/helper.go +++ b/packet/bgp/helper.go @@ -77,25 +77,25 @@ func NewTestBGPUpdateMessage() *BGPMessage { NewMacMobilityExtended(123, false), } - mp_nlri := []AddrPrefixInterface{ + prefixes1 := []AddrPrefixInterface{ NewLabeledVPNIPAddrPrefix(20, "192.0.9.0", *NewMPLSLabelStack(1, 2, 3), NewRouteDistinguisherTwoOctetAS(256, 10000)), NewLabeledVPNIPAddrPrefix(26, "192.10.8.192", *NewMPLSLabelStack(5, 6, 7, 8), NewRouteDistinguisherIPAddressAS("10.0.1.1", 10001)), } - mp_nlri2 := []AddrPrefixInterface{NewIPv6AddrPrefix(100, + prefixes2 := []AddrPrefixInterface{NewIPv6AddrPrefix(100, "fe80:1234:1234:5667:8967:af12:8912:1023")} - mp_nlri3 := []AddrPrefixInterface{NewLabeledVPNIPv6AddrPrefix(100, + prefixes3 := []AddrPrefixInterface{NewLabeledVPNIPv6AddrPrefix(100, "fe80:1234:1234:5667:8967:af12:1203:33a1", *NewMPLSLabelStack(5, 6), NewRouteDistinguisherFourOctetAS(5, 6))} - mp_nlri4 := []AddrPrefixInterface{NewLabeledIPAddrPrefix(25, "192.168.0.0", + prefixes4 := []AddrPrefixInterface{NewLabeledIPAddrPrefix(25, "192.168.0.0", *NewMPLSLabelStack(5, 6, 7))} mac, _ := net.ParseMAC("01:23:45:67:89:ab") - mp_nlri5 := []AddrPrefixInterface{ + prefixes5 := []AddrPrefixInterface{ NewEVPNNLRI(EVPN_ROUTE_TYPE_ETHERNET_AUTO_DISCOVERY, 0, &EVPNEthernetAutoDiscoveryRoute{NewRouteDistinguisherFourOctetAS(5, 6), EthernetSegmentIdentifier{ESI_ARBITRARY, make([]byte, 9)}, 2, 2}), @@ -129,12 +129,12 @@ func NewTestBGPUpdateMessage() *BGPMessage { NewPathAttributeExtendedCommunities(ecommunities), NewPathAttributeAs4Path(aspath3), NewPathAttributeAs4Aggregator(10000, "112.22.2.1"), - NewPathAttributeMpReachNLRI("112.22.2.0", mp_nlri), - NewPathAttributeMpReachNLRI("1023::", mp_nlri2), - NewPathAttributeMpReachNLRI("fe80::", mp_nlri3), - NewPathAttributeMpReachNLRI("129.1.1.1", mp_nlri4), - NewPathAttributeMpReachNLRI("129.1.1.1", mp_nlri5), - NewPathAttributeMpUnreachNLRI(mp_nlri), + NewPathAttributeMpReachNLRI("112.22.2.0", prefixes1), + NewPathAttributeMpReachNLRI("1023::", prefixes2), + NewPathAttributeMpReachNLRI("fe80::", prefixes3), + NewPathAttributeMpReachNLRI("129.1.1.1", prefixes4), + NewPathAttributeMpReachNLRI("129.1.1.1", prefixes5), + NewPathAttributeMpUnreachNLRI(prefixes1), //NewPathAttributeMpReachNLRI("112.22.2.0", []AddrPrefixInterface{}), //NewPathAttributeMpUnreachNLRI([]AddrPrefixInterface{}), &PathAttributeUnknown{ |