summaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/table/message_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/pkg/table/message_test.go')
-rw-r--r--internal/pkg/table/message_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/pkg/table/message_test.go b/internal/pkg/table/message_test.go
index 8b3287d3..8d2431e8 100644
--- a/internal/pkg/table/message_test.go
+++ b/internal/pkg/table/message_test.go
@@ -374,9 +374,9 @@ func TestASPathAs4TransMultipleLargeParams(t *testing.T) {
func TestAggregator4BytesASes(t *testing.T) {
getAggr := func(msg *bgp.BGPUpdate) *bgp.PathAttributeAggregator {
for _, attr := range msg.PathAttributes {
- switch attr.(type) {
+ switch a := attr.(type) {
case *bgp.PathAttributeAggregator:
- return attr.(*bgp.PathAttributeAggregator)
+ return a
}
}
return nil
@@ -384,9 +384,9 @@ func TestAggregator4BytesASes(t *testing.T) {
getAggr4 := func(msg *bgp.BGPUpdate) *bgp.PathAttributeAs4Aggregator {
for _, attr := range msg.PathAttributes {
- switch attr.(type) {
+ switch a := attr.(type) {
case *bgp.PathAttributeAs4Aggregator:
- return attr.(*bgp.PathAttributeAs4Aggregator)
+ return a
}
}
return nil