mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 02:35:17 +01:00
fix go vet issue in notification.go
This commit is contained in:
parent
be64407e54
commit
1a0125b2ac
@ -50,7 +50,7 @@ func (n *NotificationHandler) Post() {
|
|||||||
for _, e := range notification.Events {
|
for _, e := range notification.Events {
|
||||||
matched, err = regexp.MatchString(manifestPattern, e.Target.MediaType)
|
matched, err = regexp.MatchString(manifestPattern, e.Target.MediaType)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
beego.Error("Failed to match the media type against pattern, error: %v", err)
|
beego.Error("Failed to match the media type against pattern, error: ", err)
|
||||||
matched = false
|
matched = false
|
||||||
}
|
}
|
||||||
if matched && strings.HasPrefix(e.Request.UserAgent, "docker") {
|
if matched && strings.HasPrefix(e.Request.UserAgent, "docker") {
|
||||||
|
Loading…
Reference in New Issue
Block a user