summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-12-25 06:09:06 -0800
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-12-25 06:09:06 -0800
commit3234ade75edd5c4b01f817cc127a13feb9c25c7b (patch)
tree99653f09b515c2f52f64f8ea5d95ce6835974a2c /server
parentd9d527a65dd068e0a093ed94ad5effc13567a5e1 (diff)
rest: use interface{} for REST response
Then rest.go can use an appropriate format. Likelly we support only JSON though. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r--server/peer.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/peer.go b/server/peer.go
index 3aa87e9d..f3a23d5b 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -106,8 +106,7 @@ func (peer *Peer) path2update(pathList []table.Path) []*bgp.BGPMessage {
func (peer *Peer) handleREST(restReq *api.RestRequest) {
result := &api.RestResponseDefault{}
- j, _ := json.Marshal(peer.rib.Tables[bgp.RF_IPv4_UC])
- result.Data = j
+ result.Data = peer.rib.Tables[bgp.RF_IPv4_UC]
restReq.ResponseCh <- result
close(restReq.ResponseCh)
}