summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--table/destination.go2
-rw-r--r--table/destination_test.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/table/destination.go b/table/destination.go
index afac8e06..87f1f841 100644
--- a/table/destination.go
+++ b/table/destination.go
@@ -165,7 +165,7 @@ func (dd *Destination) ToApiStruct(id string) *api.Destination {
}
}
-func (dd *Destination) getRouteFamily() bgp.RouteFamily {
+func (dd *Destination) Family() bgp.RouteFamily {
return dd.routeFamily
}
diff --git a/table/destination_test.go b/table/destination_test.go
index a606cff6..f5556175 100644
--- a/table/destination_test.go
+++ b/table/destination_test.go
@@ -40,13 +40,13 @@ func TestDestinationNewIPv6(t *testing.T) {
func TestDestinationSetRouteFamily(t *testing.T) {
dd := &Destination{}
dd.setRouteFamily(bgp.RF_IPv4_UC)
- rf := dd.getRouteFamily()
+ rf := dd.Family()
assert.Equal(t, rf, bgp.RF_IPv4_UC)
}
func TestDestinationGetRouteFamily(t *testing.T) {
dd := &Destination{}
dd.setRouteFamily(bgp.RF_IPv6_UC)
- rf := dd.getRouteFamily()
+ rf := dd.Family()
assert.Equal(t, rf, bgp.RF_IPv6_UC)
}
func TestDestinationSetNlri(t *testing.T) {