leandergan
02/12/2023, 4:37 PM*Response
structs in golang
.
Is it like this, that if err = nil
then the OK struct
is always OK != nil
?
Just wondering if I have to also check OK == nil
or can skip it, if err = nil
.
E.g. for the CreateResetPasswordTokenResponse
, why might that not return an OK
if no err
?rp_st
02/12/2023, 4:39 PMOK
. In this case, you will have to check for if OK != nil
.
But if the response struct contains only one sub struct (which is OK
), then you can skip the OK != nil
check - we only added OK
in this to keep it consistent.leandergan
02/12/2023, 4:41 PMleandergan
02/13/2023, 1:40 PM!null
if not err
, guessing this is the case but just to be sure. 🙂rp_st
02/13/2023, 1:40 PMrp_st
02/13/2023, 1:40 PM!null