Code review comment for lp:~allenap/gwacl/remove-role-endpoints-2

Revision history for this message
Gavin Panella (allenap) wrote :

>> defer func() { Info("Removing role input endpoint...") - //
>> FIXME: Something above - AddRoleEndpoints seems a prime suspect - -
>> // causes Azure to do something asynchronously, which we must wait
>> for - // before attempting this call, or it will blow up
>> with a 409.
>
> Was this fixed previously then? Or was it not a problem?

I added this in my previous branch, but also fixed it there and forgot
to remove this message.

>
>> -func newX509Response() *x509Response { - return &x509Response{
>> - Body: make([]byte, 0), - } -} -
> [snip]
>> - response := newX509Response() + response :=
>> &x509Response{} response.StatusCode = httpResponse.StatusCode
>> response.Body, err = ioutil.ReadAll(httpResponse.Body) if err !=
>> nil {
>>
>
> This is removing a make() on the Body - is that right/ok? Go still
> leaves me wondering whether it has changed the semantics when you
> assign to Body in the second-last line here ... :/

Yeah, it's not needed. The zero value for x509Response.Body is an
empty slice.

Thanks for the review!

« Back to merge proposal