simplified using gofmt
This commit is contained in:
parent
12d66146e8
commit
5bb0d0aaf2
@ -95,17 +95,17 @@ func TestHasCommunity(t *testing.T) {
|
||||
|
||||
bgp := &BGPInfo{
|
||||
Communities: []Community{
|
||||
Community{42, 123},
|
||||
Community{23, 42},
|
||||
Community{42, 23},
|
||||
{42, 123},
|
||||
{23, 42},
|
||||
{42, 23},
|
||||
},
|
||||
ExtCommunities: []ExtCommunity{
|
||||
ExtCommunity{"rt", "23", "42"},
|
||||
ExtCommunity{"ro", "123", "456"},
|
||||
{"rt", "23", "42"},
|
||||
{"ro", "123", "456"},
|
||||
},
|
||||
LargeCommunities: []Community{
|
||||
Community{1000, 23, 42},
|
||||
Community{2000, 123, 456},
|
||||
{1000, 23, 42},
|
||||
{2000, 123, 456},
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -9,14 +9,14 @@ func makeTestRoute() *Route {
|
||||
route := &Route{
|
||||
BGP: &BGPInfo{
|
||||
Communities: []Community{
|
||||
Community{23, 42},
|
||||
Community{111, 11},
|
||||
{23, 42},
|
||||
{111, 11},
|
||||
},
|
||||
ExtCommunities: []ExtCommunity{
|
||||
ExtCommunity{"ro", "23", "123"},
|
||||
{"ro", "23", "123"},
|
||||
},
|
||||
LargeCommunities: []Community{
|
||||
Community{1000, 23, 42},
|
||||
{1000, 23, 42},
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -29,14 +29,14 @@ func makeTestLookupRoute() *LookupRoute {
|
||||
Route: &Route{
|
||||
BGP: &BGPInfo{
|
||||
Communities: []Community{
|
||||
Community{23, 42},
|
||||
Community{111, 11},
|
||||
{23, 42},
|
||||
{111, 11},
|
||||
},
|
||||
ExtCommunities: []ExtCommunity{
|
||||
ExtCommunity{"ro", "23", "123"},
|
||||
{"ro", "23", "123"},
|
||||
},
|
||||
LargeCommunities: []Community{
|
||||
Community{1000, 23, 42},
|
||||
{1000, 23, 42},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -155,8 +155,8 @@ func TestSearchFilterEqual(t *testing.T) {
|
||||
func TestSearchFilterGroupContains(t *testing.T) {
|
||||
group := SearchFilterGroup{
|
||||
Filters: []*SearchFilter{
|
||||
&SearchFilter{Value: Community{1000, 23, 42}},
|
||||
&SearchFilter{Value: Community{1001, 24, 43}},
|
||||
{Value: Community{1000, 23, 42}},
|
||||
{Value: Community{1001, 24, 43}},
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ func TestApiLogSourceError(t *testing.T) {
|
||||
|
||||
cfg := &config.Config{
|
||||
Sources: []*config.SourceConfig{
|
||||
&config.SourceConfig{
|
||||
{
|
||||
ID: "rs1v4",
|
||||
Name: "rs1.example.net (IPv4)",
|
||||
},
|
||||
|
@ -14,10 +14,10 @@ import (
|
||||
"github.com/alice-lg/alice-lg/pkg/sources/gobgp/apiutil"
|
||||
)
|
||||
|
||||
var families []gobgpapi.Family = []gobgpapi.Family{gobgpapi.Family{
|
||||
var families []gobgpapi.Family = []gobgpapi.Family{{
|
||||
Afi: gobgpapi.Family_AFI_IP,
|
||||
Safi: gobgpapi.Family_SAFI_UNICAST,
|
||||
}, gobgpapi.Family{
|
||||
}, {
|
||||
Afi: gobgpapi.Family_AFI_IP6,
|
||||
Safi: gobgpapi.Family_SAFI_UNICAST,
|
||||
},
|
||||
|
@ -21,10 +21,10 @@ func importRoutes(
|
||||
|
||||
// Prepare imported routes for lookup
|
||||
neighbors := map[string]*api.Neighbor{
|
||||
"ID163_AS31078": &api.Neighbor{
|
||||
"ID163_AS31078": {
|
||||
ID: "ID163_AS31078",
|
||||
},
|
||||
"ID7254_AS31334": &api.Neighbor{
|
||||
"ID7254_AS31334": {
|
||||
ID: "ID7254_AS31334",
|
||||
},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user