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 --- ancestor/integration_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ancestor/integration_test.go') diff --git a/ancestor/integration_test.go b/ancestor/integration_test.go index d13c86ed..fa630f57 100644 --- a/ancestor/integration_test.go +++ b/ancestor/integration_test.go @@ -112,8 +112,8 @@ func TestIsMissingObject(t *testing.T) { t.Fatal("expected error") } - var missing *giterrors.ObjectMissingError - if !errors.As(err, &missing) { + missing, ok := errors.AsType[*giterrors.ObjectMissingError](err) + if !ok { t.Fatalf("expected ObjectMissingError, got %T (%v)", err, err) } -- cgit v1.3.1-10-gc9f91