Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unmarshall errors, add condition for nil reference #301

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

illia-li
Copy link

@illia-li illia-li commented Oct 9, 2024

Added for smallint, int, bigint, counter cql types.
Additional fixed errors text for tinyint cql type

@@ -323,7 +399,7 @@ func decReflectInt8(p []byte, v reflect.Value) error {
case 4:
val := decInt32(p)
if val > math.MaxInt8 || val < math.MinInt8 {
return fmt.Errorf("failed to unmarshal int: to unmarshal into int8, the data should be in the int8 range")
return fmt.Errorf("failed to unmarshal int: to unmarshal into custom int8, the data should be in the int8 range")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return fmt.Errorf("failed to unmarshal int: to unmarshal into custom int8, the data should be in the int8 range")
return fmt.Errorf("failed to unmarshal int: to unmarshal into %T, the data should be in the int8 range", v.Interface())

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@illia-li illia-li force-pushed the il/fix/marshal/nil_reference branch from c970f62 to e25a17d Compare October 9, 2024 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants