refactor: use reflect.TypeFor (#7696)

This commit is contained in:
zhetaicheleba
2025-11-20 02:40:18 +09:00
committed by GitHub
parent 614a364458
commit 9989ac5060
6 changed files with 112 additions and 112 deletions

View File

@@ -318,7 +318,7 @@ func TestCloudDNS(t *testing.T) {
for i, ns := range rec.Msg.Ns {
got, ok := ns.(*dns.SOA)
if !ok {
t.Errorf("Test %d: Unexpected NS type. Want: SOA, got: %v", ti, reflect.TypeOf(got))
t.Errorf("Test %d: Unexpected NS type. Want: SOA, got: %v", ti, reflect.TypeFor[*dns.SOA]())
}
if got.String() != tc.wantNS[i] {
t.Errorf("Test %d: Unexpected NS.\nWant: %v\nGot: %v", ti, tc.wantNS[i], got)