You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
I find it hard to control whether the walk visits objects or not.
In particular when SliceElem() returns reflectwalk.SkipEntry what I would expect is "don't descend into this element, but continue to the next one". But, what happens is "don't continue to the next one" (Contrast this behavior with StructField, where SkipEntry does continue to the next field. The comment in code says "pretends this field doesn't even exist".) I can't see any way to skip descending into a slice element, but do continue to visit the remaining elements.
Another troublesome aspect is that errors returned by Enter() and Exit() are simply ignored. I had to look into reflectwalk.go to figure out why returning SkipEntry there had no effect.
If I'm using the API incorrectly, please let me know. Thanks!
I find it hard to control whether the walk visits objects or not.
In particular when SliceElem() returns reflectwalk.SkipEntry what I would expect is "don't descend into this element, but continue to the next one". But, what happens is "don't continue to the next one" (Contrast this behavior with StructField, where SkipEntry does continue to the next field. The comment in code says "pretends this field doesn't even exist".) I can't see any way to skip descending into a slice element, but do continue to visit the remaining elements.
Another troublesome aspect is that errors returned by Enter() and Exit() are simply ignored. I had to look into reflectwalk.go to figure out why returning SkipEntry there had no effect.
If I'm using the API incorrectly, please let me know. Thanks!