util/reflect: fix StructFieldByTag

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-05-04 13:16:31 +03:00
parent 4e99680c30
commit 1a1459dd0e
2 changed files with 10 additions and 12 deletions

View File

@@ -190,9 +190,9 @@ func TestStructFieldByTag(t *testing.T) {
t.Fatal(err)
}
if v, ok := iface.(*[]string); !ok {
if v, ok := iface.([]string); !ok {
t.Fatalf("not *[]string %v", iface)
} else if len(*v) != 2 {
} else if len(v) != 2 {
t.Fatalf("invalid number %v", iface)
}
}