Skip to content

Commit

Permalink
Move accessing object element after err check
Browse files Browse the repository at this point in the history
  • Loading branch information
mxygem committed Jul 27, 2021
1 parent da990c3 commit a69c065
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/events/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ func (p Processor) StartRelease(event *Event, app *model.TuberApp) {
logger.Info("release starting")

yamls, err := gcr.GetTuberLayer(logger, event.digest, p.creds)
logger.Debug("current tags detected from gcr digest: " + strings.Join(yamls.Tags, ", ") + " :<-")
if err != nil {
p.slackClient.Message(logger, ":skull_and_crossbones: image or tuber layer not found for "+app.Name, app.SlackChannel)
logger.Error("failed to find tuber layer", zap.Error(err))
report.Error(err, errorScope.WithContext("find tuber layer"))
return
}
logger.Debug("current tags detected from gcr digest: " + strings.Join(yamls.Tags, ", ") + " :<-")

var ti tagInfo
if app.GithubRepo != "" {
Expand Down

0 comments on commit a69c065

Please sign in to comment.