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

No value in HubSpot field the call to the value type method will fail #4

Closed
kk-no opened this issue Feb 28, 2022 · 0 comments · Fixed by #5
Closed

No value in HubSpot field the call to the value type method will fail #4

kk-no opened this issue Feb 28, 2022 · 0 comments · Fixed by #5
Assignees
Labels
bug Something isn't working

Comments

@kk-no
Copy link
Member

kk-no commented Feb 28, 2022

Version

  • Go 1.17
  • go-hubspot v0.1.0

Describe the bug

If the HubSpot field does not have a value, the struct will be marshalled with nil.
But, the HsStr.String is a method of value type, a call with nil will fail and a panic will be occurred.
We need to make the receiver a pointer and do a nil check.

@kk-no kk-no self-assigned this Feb 28, 2022
@kk-no kk-no added the bug Something isn't working label Feb 28, 2022
@kk-no kk-no linked a pull request Feb 28, 2022 that will close this issue
@kk-no kk-no closed this as completed in #5 Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant