Address further code review comment regarding JobExists method
This commit is contained in:
parent
b26290d922
commit
7b73930ce5
2 changed files with 19 additions and 9 deletions
14
helpers.go
14
helpers.go
|
@ -12,12 +12,12 @@ func (r *Client) JobExists(key aurora.JobKey) (bool, error) {
|
|||
return false, err
|
||||
}
|
||||
|
||||
return !(resp == nil ||
|
||||
resp.GetResult_() == nil ||
|
||||
resp.GetResult_().GetConfigSummaryResult_() == nil ||
|
||||
resp.GetResult_().GetConfigSummaryResult_().GetSummary() == nil ||
|
||||
resp.GetResult_().GetConfigSummaryResult_().GetSummary().GetGroups() == nil ||
|
||||
len(resp.GetResult_().GetConfigSummaryResult_().GetSummary().GetGroups()) == 0 ||
|
||||
resp.GetResponseCode() != aurora.ResponseCode_OK),
|
||||
return resp != nil &&
|
||||
resp.GetResult_() != nil &&
|
||||
resp.GetResult_().GetConfigSummaryResult_() != nil &&
|
||||
resp.GetResult_().GetConfigSummaryResult_().GetSummary() != nil &&
|
||||
resp.GetResult_().GetConfigSummaryResult_().GetSummary().GetGroups() != nil &&
|
||||
len(resp.GetResult_().GetConfigSummaryResult_().GetSummary().GetGroups()) > 0 &&
|
||||
resp.GetResponseCode() == aurora.ResponseCode_OK,
|
||||
nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue