-
Notifications
You must be signed in to change notification settings - Fork 20
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
2023-11-03
: making the Response parsing consistent
#114
Conversation
Now when deserializing the Response we're checking if `resp` and `resp.Response` are both != nil before trying to unmarshal. See hashicorp/terraform-provider-azurerm#25521 for an example of where this manifests by being done inconsistently - as such doing this across the board means this'll take effect everywhere, plus be included in any new operations which are based on the existing one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
c1db60f
to
57ad29f
Compare
57ad29f
to
bbf0f64
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spotted one import needing sorted but otherwise LGTM!
@@ -3,6 +3,8 @@ package files | |||
import ( | |||
"context" | |||
"fmt" | |||
"github.com/hashicorp/go-azure-helpers/lang/pointer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imports need sorted here
Now when deserializing the Response we're checking if
resp
andresp.Response
are both != nil before trying to unmarshal.See hashicorp/terraform-provider-azurerm#25521 for an example of where this manifests by being done inconsistently - as such doing this across the board means this'll take effect everywhere, plus be included in any new operations which are based on the existing one