Passing tag as a parameter or the value will be overwritten

This commit is contained in:
Wenkai Yin 2018-01-08 15:23:35 +08:00
parent f8af1f275e
commit 7da89ec39b

View File

@ -264,8 +264,8 @@ func (ra *RepositoryAPI) Delete() {
}
log.Infof("delete tag: %s:%s", repoName, t)
go func() {
image := repoName + ":" + t
go func(tag string) {
image := repoName + ":" + tag
err := notifier.Publish(topic.ReplicationEventTopicOnDeletion, notification.OnDeletionNotification{
Image: image,
})
@ -274,7 +274,7 @@ func (ra *RepositoryAPI) Delete() {
return
}
log.Debugf("the on deletion topic for resource %s published", image)
}()
}(t)
go func(tag string) {
if err := dao.AddAccessLog(models.AccessLog{