aboutsummaryrefslogtreecommitdiff
path: root/format/sideband64k/decoder_invalid_band_test.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-07 00:38:50 +0800
committerGravatar Runxi Yu2026-03-07 00:38:50 +0800
commit474bcba13eddb1ae2fb2fa6340f1c4064cdcf12f (patch)
tree96e703836798d9a15e6159cda37f242fa3693f18 /format/sideband64k/decoder_invalid_band_test.go
parentUrgh I made some wrong amends and I'm too tired to separate the commits out t... (diff)
signatureNo signature
*: Use errors.AsType
Diffstat (limited to 'format/sideband64k/decoder_invalid_band_test.go')
-rw-r--r--format/sideband64k/decoder_invalid_band_test.go3
1 files changed, 1 insertions, 2 deletions
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)
}
}