mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
fix iterate test
This commit is contained in:
parent
1dae711d33
commit
f1a105cc06
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user