From 474bcba13eddb1ae2fb2fa6340f1c4064cdcf12f Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 7 Mar 2026 00:38:50 +0800 Subject: *: Use errors.AsType --- format/sideband64k/decoder_invalid_band_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'format/sideband64k/decoder_invalid_band_test.go') diff --git a/format/sideband64k/decoder_invalid_band_test.go b/format/sideband64k/decoder_invalid_band_test.go index 5a58640c..12c53891 100644 --- a/format/sideband64k/decoder_invalid_band_test.go +++ b/format/sideband64k/decoder_invalid_band_test.go @@ -14,8 +14,7 @@ func TestDecoderInvalidBand(t *testing.T) { dec := sideband64k.NewDecoder(strings.NewReader("0005\x04"), sideband64k.ReadOptions{}) _, err := dec.ReadFrame() - var pe *sideband64k.ProtocolError - if !errors.As(err, &pe) { + if _, ok := errors.AsType[*sideband64k.ProtocolError](err); !ok { t.Fatalf("got err %v, want ProtocolError", err) } } -- cgit v1.3.1-10-gc9f91