Skip to content

Commit 9eb31d0

Browse files
author
Sergey Klyaus
committed
golang-ci lint fix
1 parent f0feb23 commit 9eb31d0

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

internal/pkg/table/path.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,8 @@ func UpdatePathAttrs(logger log.Logger, global *oc.Global, info *PeerInfo, origi
336336
"Topic": "Peer",
337337
"PeerGroup": info.PeerGroup,
338338
"ID": info.ID,
339-
"Type": info.PeerType})
339+
"Type": info.PeerType,
340+
})
340341
}
341342
return path
342343
}

pkg/server/peer.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,8 @@ func (peer *peer) needToAdvertise() bool {
614614
peer.fsm.logger.Debug("now syncing, suppress sending updates",
615615
log.Fields{
616616
"Topic": "Peer",
617-
"Key": peer.fsm.pConf.State.NeighborAddress})
617+
"Key": peer.fsm.pConf.State.NeighborAddress,
618+
})
618619
peer.fsm.lock.RUnlock()
619620
return false
620621
}
@@ -717,7 +718,8 @@ func toGlobalFamilies(peer receiver, families []bgp.Family) []bgp.Family {
717718
"Topic": "Peer",
718719
"Key": id,
719720
"Family": f,
720-
"VRF": vrf})
721+
"VRF": vrf,
722+
})
721723
}
722724
}
723725
families = fs
@@ -1062,7 +1064,8 @@ func (peer *peer) handleUpdate(e *fsmMsg) ([]*table.Path, []bgp.Family, bool) {
10621064
log.Fields{
10631065
"Topic": "Peer",
10641066
"Key": peer.fsm.pConf.State.NeighborAddress,
1065-
"nlri": path.GetNlri().String()})
1067+
"nlri": path.GetNlri().String(),
1068+
})
10661069
}
10671070
}
10681071
// RFC4456 8. Avoiding Routing Information Loops

pkg/server/peer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ func countReachPaths(paths []*table.Path) (count int) {
483483
count++
484484
}
485485
}
486-
return
486+
return count
487487
}
488488

489489
// Topology test spawns multiple servers and tests various aspects of passing route via

pkg/server/server.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ func filterpath(r receiver, path, old *table.Path) *table.Path {
506506
}
507507
}
508508

509-
//iBGP handling
509+
// iBGP handling
510510
if r.isIBGPPeer() {
511511
ignore := false
512512
if !path.IsLocal() {
@@ -616,7 +616,8 @@ func (s *BgpServer) prePolicyFilterpath(r receiver, path, old *table.Path) (*tab
616616
log.Fields{
617617
"Topic": "Peer",
618618
"Key": r.ID(),
619-
"Path": path})
619+
"Path": path,
620+
})
620621
pathExportSkipped(r, path, "rtm-already-sent")
621622
return nil, nil, true
622623
}
@@ -1330,8 +1331,8 @@ func (s *BgpServer) propagateUpdateToNeighbors(rib *table.TableManager, source *
13301331
family := newPath.GetFamily()
13311332

13321333
for _, targetPeer := range s.receiverMap {
1333-
if (source == nil && targetPeer.isRouteServerClient()) ||
1334-
(source != nil && source.isRouteServerClient() != targetPeer.isRouteServerClient()) {
1334+
if source == nil && targetPeer.isRouteServerClient() ||
1335+
source != nil && source.isRouteServerClient() != targetPeer.isRouteServerClient() {
13351336
continue
13361337
}
13371338
f := func() bgp.Family {
@@ -2091,7 +2092,8 @@ func (s *BgpServer) SetPolicies(ctx context.Context, r *api.SetPoliciesRequest)
20912092
s.logger.Info("call set policy",
20922093
log.Fields{
20932094
"Topic": "Peer",
2094-
"Key": id})
2095+
"Key": id,
2096+
})
20952097

20962098
a, err := getConfig(id)
20972099
if err != nil {
@@ -3508,7 +3510,8 @@ func (s *BgpServer) deleteNeighbor(c *oc.Neighbor, code, subcode uint8, sendNoti
35083510
s.logger.Warn("Unexpected peer without an actual peer group",
35093511
log.Fields{
35103512
"Topic": "Peer",
3511-
"Key": addr})
3513+
"Key": addr,
3514+
})
35123515
}
35133516
}
35143517

0 commit comments

Comments
 (0)