From fc62dea4716b3fd89c879db9c196ffc36d5037cd Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 21 May 2018 19:43:44 +0800 Subject: [PATCH] fix imports --- modules/notification/action/action.go | 2 +- modules/notification/indexer/indexer.go | 2 +- routers/api/v1/repo/pull.go | 3 +-- routers/repo/issue.go | 6 +++--- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/notification/action/action.go b/modules/notification/action/action.go index debb62692..208db8cbc 100644 --- a/modules/notification/action/action.go +++ b/modules/notification/action/action.go @@ -20,7 +20,7 @@ var ( receiver notification.NotifyReceiver = &actionReceiver{} ) -func ini() { +func init() { notification.RegisterReceiver(receiver) } diff --git a/modules/notification/indexer/indexer.go b/modules/notification/indexer/indexer.go index 60092ab15..68ee3e2f7 100644 --- a/modules/notification/indexer/indexer.go +++ b/modules/notification/indexer/indexer.go @@ -17,7 +17,7 @@ var ( receiver notification.NotifyReceiver = &indexerReceiver{} ) -func ini() { +func init() { notification.RegisterReceiver(receiver) } diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go index 942727478..639b36689 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -8,13 +8,12 @@ import ( "fmt" "strings" - "code.gitea.io/gitea/modules/notification" - "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/util" api "code.gitea.io/sdk/gitea" diff --git a/routers/repo/issue.go b/routers/repo/issue.go index e2e58f208..bbef9a783 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -14,9 +14,6 @@ import ( "strings" "time" - "github.com/Unknwon/com" - "github.com/Unknwon/paginater" - "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" @@ -28,6 +25,9 @@ import ( "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" + + "github.com/Unknwon/com" + "github.com/Unknwon/paginater" ) const (