fix iterate test

This commit is contained in:
c9s 2023-07-20 12:19:31 +08:00
parent 1dae711d33
commit f1a105cc06
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -75,7 +75,7 @@ func TestIterateFieldsByTag(t *testing.T) {
collectedTags := []string{}
cnt := 0
err := IterateFieldsByTag(&a, "persistence", false, func(tag string, ft reflect.StructField, fv reflect.Value) error {
err := IterateFieldsByTag(&a, "persistence", true, func(tag string, ft reflect.StructField, fv reflect.Value) error {
cnt++
collectedTags = append(collectedTags, tag)
return nil
@ -101,7 +101,7 @@ func TestIterateFieldsByTag(t *testing.T) {
collectedTags := []string{}
cnt := 0
err := IterateFieldsByTag(&a, "persistence", false, func(tag string, ft reflect.StructField, fv reflect.Value) error {
err := IterateFieldsByTag(&a, "persistence", true, func(tag string, ft reflect.StructField, fv reflect.Value) error {
cnt++
collectedTags = append(collectedTags, tag)
return nil
@ -119,7 +119,7 @@ func TestIterateFieldsByTag(t *testing.T) {
collectedTags := []string{}
cnt := 0
err := IterateFieldsByTag(a, "persistence", false, func(tag string, ft reflect.StructField, fv reflect.Value) error {
err := IterateFieldsByTag(a, "persistence", true, func(tag string, ft reflect.StructField, fv reflect.Value) error {
cnt++
collectedTags = append(collectedTags, tag)
return nil