diff options
author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-01-09 09:07:06 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-01-09 14:36:48 +0900 |
commit | 1d14b8ecfba61de524e0266e4a0fddb3b111f235 (patch) | |
tree | 8e66d6dada1377f85e58669c416f7f4cf993ee34 /internal/pkg/table/message_test.go | |
parent | 0ae389ad1e7daeaeb354cd4be76b13ece9153e00 (diff) |
silence staticcheck warnings
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Diffstat (limited to 'internal/pkg/table/message_test.go')
-rw-r--r-- | internal/pkg/table/message_test.go | 8 |
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 |