diff options
author | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2015-04-23 16:40:30 +0900 |
---|---|---|
committer | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2015-04-23 19:07:24 +0900 |
commit | 4ac0420b85170dcfcb214541910c7342674ea323 (patch) | |
tree | 9dd221d800d6282426d965cf739b755ac1d01c70 /table | |
parent | c8fdac2ee5586ff81a72f821ef994f10ef6ec587 (diff) |
path: use MarshalJSON() declared in PathDefault
Diffstat (limited to 'table')
-rw-r--r-- | table/path.go | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/table/path.go b/table/path.go index 5abd1f10..9e296edb 100644 --- a/table/path.go +++ b/table/path.go @@ -403,20 +403,6 @@ func (ipv6p *IPv6Path) String() string { return str } -func (ipv6p *IPv6Path) MarshalJSON() ([]byte, error) { - return json.Marshal(struct { - Network string - Nexthop string - Attrs []bgp.PathAttributeInterface - Age int64 - }{ - Network: ipv6p.getPrefix(), - Nexthop: ipv6p.PathDefault.GetNexthop().String(), - Attrs: ipv6p.PathDefault.getPathAttrs(), - Age: int64(time.Now().Sub(ipv6p.PathDefault.timestamp).Seconds()), - }) -} - type IPv4VPNPath struct { *PathDefault } |