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
When func (errs List) As(target interface{}) bool in gqlerror/error.go:100 is called, the target out argument is passed as pointer to errors.As() for each list element.
What did you expect?
To work as expected when being called from inside errors.As() and return the first instance matching the type of the target parameter, errors.As() has to be called with target, not &target.
What happened?
When
func (errs List) As(target interface{}) bool
ingqlerror/error.go:100
is called, the target out argument is passed as pointer toerrors.As()
for each list element.What did you expect?
To work as expected when being called from inside
errors.As()
and return the first instance matching the type of thetarget
parameter,errors.As()
has to be called withtarget
, not&target
.Versions
v 2.5.9
Cause
The recent commit 450a0ee introduced this bug.
The text was updated successfully, but these errors were encountered: