Skip to content

Commit

Permalink
Please don't even try to process nil values :trollface:
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanilves committed Apr 25, 2018
1 parent 9926e31 commit 7dfacac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/v1/v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,14 @@ func (api *API) PullTags(cn *collection.Collection) error {
log.Infof("PULLING %s", ref)

resp, err := api.dockerClient.Pull(ref)
if err != nil {

This comment has been minimized.

Copy link
@ivanilves

ivanilves Apr 25, 2018

Author Owner

if error is not nil, the response will be nil for sure, no sense to proceed if this happens 😃

done <- err
return
}

logDebugData(resp)

This comment has been minimized.

Copy link
@ivanilves

ivanilves Apr 25, 2018

Author Owner

I do not check if response is nil or not. Because if error is nil, response should be a sane value.


done <- err
done <- nil
}
}(repo, tags, done)
}
Expand Down

0 comments on commit 7dfacac

Please sign in to comment.