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
The code tries to unmarshal wrong type of json into a variable and returns an error as expected.
But after that, the variable of []string was filled with 3 elements of empty string, which is unexpected.
What did you expect to see?
If error occurred during unmarshal , the target variable should be recoverd to original states indead of filled with unexpected emements
The text was updated successfully, but these errors were encountered:
Go version
go version go1.23.4 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
This is the code to reproduce my issue
What did you see happen?
The code tries to unmarshal wrong type of json into a variable and returns an error as expected.
But after that, the variable of []string was filled with 3 elements of empty string, which is unexpected.
What did you expect to see?
If error occurred during unmarshal , the target variable should be recoverd to original states indead of filled with unexpected emements
The text was updated successfully, but these errors were encountered: