diff options
-rw-r--r-- | table/table.go | 4 | ||||
-rw-r--r-- | table/table_test.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/table/table.go b/table/table.go index 0c7bb653..e514395e 100644 --- a/table/table.go +++ b/table/table.go @@ -140,7 +140,7 @@ func (t *Table) validateNlri(nlri bgp.AddrPrefixInterface) { func (t *Table) getOrCreateDest(nlri bgp.AddrPrefixInterface) *Destination { log.Debugf("getOrCreateDest Table type : %s", reflect.TypeOf(t)) tableKey := t.tableKey(nlri) - dest := t.getDestination(tableKey) + dest := t.GetDestination(tableKey) // If destination for given prefix does not exist we create it. if dest == nil { log.Debugf("getOrCreateDest dest with key %s is not found", tableKey) @@ -156,7 +156,7 @@ func (t *Table) GetDestinations() map[string]*Destination { func (t *Table) setDestinations(destinations map[string]*Destination) { t.destinations = destinations } -func (t *Table) getDestination(key string) *Destination { +func (t *Table) GetDestination(key string) *Destination { dest, ok := t.destinations[key] if ok { return dest diff --git a/table/table_test.go b/table/table_test.go index 9f1e6f16..0ece7568 100644 --- a/table/table_test.go +++ b/table/table_test.go @@ -32,7 +32,7 @@ func TestTableDeleteDestByNlri(t *testing.T) { ipv4t.setDestination(tableKey, dest) } tableKey := ipv4t.tableKey(pathT[0].GetNlri()) - gdest := ipv4t.getDestination(tableKey) + gdest := ipv4t.GetDestination(tableKey) rdest := ipv4t.deleteDestByNlri(pathT[0].GetNlri()) assert.Equal(t, rdest, gdest) } @@ -50,7 +50,7 @@ func TestTableDeleteDest(t *testing.T) { dest := NewDestination(pathT[0].GetNlri()) ipv4t.setDestination(tableKey, dest) ipv4t.deleteDest(dest) - gdest := ipv4t.getDestination(tableKey) + gdest := ipv4t.GetDestination(tableKey) assert.Nil(t, gdest) } |