From 1d14b8ecfba61de524e0266e4a0fddb3b111f235 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Wed, 9 Jan 2019 09:07:06 +0900 Subject: silence staticcheck warnings Signed-off-by: FUJITA Tomonori --- internal/pkg/table/message_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/pkg/table/message_test.go') 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 -- cgit v1.2.3