inloco / incognia-go

Go library for Incognia API
MIT License
5 stars 5 forks source link

fix: handle the absence of optional and required fields #35

Closed figueredo closed 2 years ago

figueredo commented 2 years ago

RegisterSignup and RegisterFeedback are not verifying the existence of optional fields before trying to use them, and RegisterFeedback, RegisterLogin and RegisterPayment are not verifying the existence of required fields, leading to a nil pointer dereference error.

This PR adds nil validation to pointer types and the validation of FeedbackType parameters.

Fixes #34.