diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-04-15 05:24:58 +0000 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-04-15 05:24:58 +0000 |
commit | 3f6876df0b16043412972e7fd92377226bc9c89d (patch) | |
tree | d8b1e2a41a0dca1720929807cc8161568e7c3565 /table/table_test.go | |
parent | a1114dc7bb6dcb165c6494799be94b5d10fe5b17 (diff) |
api: add a method to convert internal structs to protobuf structs
- add ToApiStruct() for convertion of internal structs to protobuf structs
to avoid ugly convertion by json.Marshal() && json.Unmarshal()
- move grpc server code under /server instead of /api
- update proto file to include more detailed path information
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'table/table_test.go')
-rw-r--r-- | table/table_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/table/table_test.go b/table/table_test.go index 81e377f6..407fbe0a 100644 --- a/table/table_test.go +++ b/table/table_test.go @@ -88,7 +88,7 @@ func TestTableSetDestinations(t *testing.T) { destinations[tableKey] = dest } ipv4t.setDestinations(destinations) - ds := ipv4t.getDestinations() + ds := ipv4t.GetDestinations() assert.Equal(t, ds, destinations) } func TestTableGetDestinations(t *testing.T) { @@ -103,7 +103,7 @@ func TestTableGetDestinations(t *testing.T) { destinations[tableKey] = dest } ipv4t.setDestinations(destinations) - ds := ipv4t.getDestinations() + ds := ipv4t.GetDestinations() assert.Equal(t, ds, destinations) } |