Skip to content

Commit 0d696c4

Browse files
Update client/user.go
Fix whitespace as per feedback Co-authored-by: Denis Melnik <[email protected]>
1 parent 89613a5 commit 0d696c4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

client/user.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -264,15 +264,15 @@ func (client *Client) DeleteUser(userName string) error {
264264
Method: "DELETE",
265265
}
266266

267-
// The API will return a 500 error if the user cannot be found
268-
// In this case the DeleteUser function should not return an error.
269-
// Return error only if the body of the return message does not contain "User does not exist"
270-
res, err := client.RequestAPI(&opts)
271-
if err != nil {
272-
if !strings.Contains(string(res), "User does not exist"){
273-
return err
267+
// The API will return a 500 error if the user cannot be found
268+
// In this case the DeleteUser function should not return an error.
269+
// Return error only if the body of the return message does not contain "User does not exist"
270+
res, err := client.RequestAPI(&opts)
271+
if err != nil {
272+
if !strings.Contains(string(res), "User does not exist") {
273+
return err
274+
}
274275
}
275-
}
276276

277277
return nil
278278
}

0 commit comments

Comments
 (0)