From 7da89ec39be885a23d68fc7b65072ff044c1fd17 Mon Sep 17 00:00:00 2001 From: Wenkai Yin Date: Mon, 8 Jan 2018 15:23:35 +0800 Subject: [PATCH] Passing tag as a parameter or the value will be overwritten --- src/ui/api/repository.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui/api/repository.go b/src/ui/api/repository.go index 84551effd..c61f2c20f 100644 --- a/src/ui/api/repository.go +++ b/src/ui/api/repository.go @@ -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{