Skip to content

Commit

Permalink
go fmted
Browse files Browse the repository at this point in the history
  • Loading branch information
serejkus committed Jan 27, 2021
1 parent 43c6263 commit 7202785
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cmd/gobgp/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ func makeMonitorRouteArgs(p *api.Path, showIdentifier bgp.BGPAddPathMode) []inte
}

func monitorRoute(pathList []*api.Path, showIdentifier bgp.BGPAddPathMode) {
var pathStrs [][]interface{}
pathStrs := make([][]interface{}, len(pathList))

for _, p := range pathList {
pathStrs = append(pathStrs, makeMonitorRouteArgs(p, showIdentifier))
for i, p := range pathList {
pathStrs[i] = makeMonitorRouteArgs(p, showIdentifier)
}

format := time.Now().UTC().Format(time.RFC3339)
Expand Down
4 changes: 2 additions & 2 deletions pkg/packet/bgp/bgp.go
Original file line number Diff line number Diff line change
Expand Up @@ -2384,7 +2384,7 @@ func (er *EVPNEthernetAutoDiscoveryRoute) Len() int {
func (er *EVPNEthernetAutoDiscoveryRoute) DecodeFromBytes(data []byte) error {
er.RD = GetRouteDistinguisher(data)
rdLen := er.RD.Len()
if len(data) < rdLen + 14 { // 14 is 10 for
if len(data) < rdLen+14 { // 14 is 10 for
return NewMessageError(BGP_ERROR_UPDATE_MESSAGE_ERROR, BGP_ERROR_SUB_MALFORMED_ATTRIBUTE_LIST, nil, "bad Ethernet Auto-discovery Route length")
}
data = data[er.RD.Len():]
Expand Down Expand Up @@ -2644,7 +2644,7 @@ func (er *EVPNMulticastEthernetTagRoute) Len() int {
func (er *EVPNMulticastEthernetTagRoute) DecodeFromBytes(data []byte) error {
er.RD = GetRouteDistinguisher(data)
rdLen := er.RD.Len()
if len(data) < rdLen + 4 {
if len(data) < rdLen+4 {
return NewMessageError(BGP_ERROR_UPDATE_MESSAGE_ERROR, BGP_ERROR_SUB_MALFORMED_ATTRIBUTE_LIST, nil, "invalid length of multicast ethernet tag route")
}
data = data[er.RD.Len():]
Expand Down

0 comments on commit 7202785

Please sign in to comment.