Skip to content

Commit

Permalink
simplified using gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
annikahannig committed Nov 10, 2022
1 parent 12d6614 commit 5bb0d0a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
14 changes: 7 additions & 7 deletions pkg/api/response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
},
}

Expand Down
20 changes: 10 additions & 10 deletions pkg/api/search_filters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
},
},
}
Expand All @@ -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},
},
},
},
Expand Down Expand Up @@ -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}},
},
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/http/logging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func TestApiLogSourceError(t *testing.T) {

cfg := &config.Config{
Sources: []*config.SourceConfig{
&config.SourceConfig{
{
ID: "rs1v4",
Name: "rs1.example.net (IPv4)",
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/sources/gobgp/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/store/routes_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
}
Expand Down

0 comments on commit 5bb0d0a

Please sign in to comment.