diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-04-05 13:40:33 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-04-10 00:04:48 +0900 |
commit | 3ae8c9170b399ed9b64fe5382fc9a58c5c9f8b6b (patch) | |
tree | 051cf914e10bc0f8bcdf07139fdab793dcda3d8f /server/server.go | |
parent | 7cec3f5e8984890b9cccc4a9911f821b891b9dfe (diff) |
server: fix style
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/server/server.go b/server/server.go index 5797e09e..7f84d5db 100644 --- a/server/server.go +++ b/server/server.go @@ -163,15 +163,16 @@ type BgpServer struct { } func NewBgpServer() *BgpServer { - b := BgpServer{} - b.updatedPeerCh = make(chan config.Neighbor) - b.GrpcReqCh = make(chan *GrpcRequest, 1) - b.policyUpdateCh = make(chan config.RoutingPolicy) - b.neighborMap = make(map[string]*Peer) - b.watchers = Watchers(make(map[watcherType]watcher)) - b.roaManager, _ = NewROAManager(0) - b.policy = table.NewRoutingPolicy() - return &b + roaManager, _ := NewROAManager(0) + return &BgpServer{ + updatedPeerCh: make(chan config.Neighbor), + GrpcReqCh: make(chan *GrpcRequest, 1), + policyUpdateCh: make(chan config.RoutingPolicy), + neighborMap: make(map[string]*Peer), + watchers: Watchers(make(map[watcherType]watcher)), + policy: table.NewRoutingPolicy(), + roaManager: roaManager, + } } func (server *BgpServer) notify2watchers(typ watcherEventType, ev watcherEvent) error { |