diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2021-11-17 20:34:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-17 20:34:35 +0800 |
commit | 750a8465f547e9f08a87612c75898d56b8ec1f88 (patch) | |
tree | f3eed8b40971c01a75617675a24014233b9f1cc7 /services | |
parent | 29cc169d20fc995072a819da6f996717a9899b3b (diff) | |
download | gitea-750a8465f547e9f08a87612c75898d56b8ec1f88.tar.gz gitea-750a8465f547e9f08a87612c75898d56b8ec1f88.zip |
A better go code formatter, and now `make fmt` can run in Windows (#17684)
* go build / format tools
* re-format imports
Diffstat (limited to 'services')
-rw-r--r-- | services/auth/signin.go | 3 | ||||
-rw-r--r-- | services/auth/source/oauth2/store.go | 1 | ||||
-rw-r--r-- | services/auth/source/oauth2/token.go | 1 | ||||
-rw-r--r-- | services/cron/setting.go | 1 | ||||
-rw-r--r-- | services/forms/user_form_auth_openid.go | 1 | ||||
-rw-r--r-- | services/gitdiff/csv_test.go | 1 | ||||
-rw-r--r-- | services/issue/assignee_test.go | 1 | ||||
-rw-r--r-- | services/issue/label_test.go | 1 | ||||
-rw-r--r-- | services/repository/fork_test.go | 1 | ||||
-rw-r--r-- | services/webhook/deliver_test.go | 1 | ||||
-rw-r--r-- | services/webhook/webhook_test.go | 1 |
11 files changed, 11 insertions, 2 deletions
diff --git a/services/auth/signin.go b/services/auth/signin.go index 5477e8643e..504214f9f1 100644 --- a/services/auth/signin.go +++ b/services/auth/signin.go @@ -13,8 +13,7 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/log" - // Register the sources - _ "code.gitea.io/gitea/services/auth/source/db" + _ "code.gitea.io/gitea/services/auth/source/db" // register the sources (and below) _ "code.gitea.io/gitea/services/auth/source/ldap" _ "code.gitea.io/gitea/services/auth/source/oauth2" _ "code.gitea.io/gitea/services/auth/source/pam" diff --git a/services/auth/source/oauth2/store.go b/services/auth/source/oauth2/store.go index fc29056c24..4026abb6ec 100644 --- a/services/auth/source/oauth2/store.go +++ b/services/auth/source/oauth2/store.go @@ -10,6 +10,7 @@ import ( "net/http" "code.gitea.io/gitea/modules/log" + chiSession "gitea.com/go-chi/session" "github.com/gorilla/sessions" ) diff --git a/services/auth/source/oauth2/token.go b/services/auth/source/oauth2/token.go index 0c7c5d8caa..c9a45340a1 100644 --- a/services/auth/source/oauth2/token.go +++ b/services/auth/source/oauth2/token.go @@ -9,6 +9,7 @@ import ( "time" "code.gitea.io/gitea/modules/timeutil" + "github.com/golang-jwt/jwt" ) diff --git a/services/cron/setting.go b/services/cron/setting.go index d55e5b60ad..a0393e23dc 100644 --- a/services/cron/setting.go +++ b/services/cron/setting.go @@ -8,6 +8,7 @@ import ( "time" "code.gitea.io/gitea/models" + "github.com/unknwon/i18n" ) diff --git a/services/forms/user_form_auth_openid.go b/services/forms/user_form_auth_openid.go index b34f9dcc97..fd3368d303 100644 --- a/services/forms/user_form_auth_openid.go +++ b/services/forms/user_form_auth_openid.go @@ -9,6 +9,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/web/middleware" + "gitea.com/go-chi/binding" ) diff --git a/services/gitdiff/csv_test.go b/services/gitdiff/csv_test.go index 4101477d89..b4f725e558 100644 --- a/services/gitdiff/csv_test.go +++ b/services/gitdiff/csv_test.go @@ -11,6 +11,7 @@ import ( csv_module "code.gitea.io/gitea/modules/csv" "code.gitea.io/gitea/modules/setting" + "github.com/stretchr/testify/assert" ) diff --git a/services/issue/assignee_test.go b/services/issue/assignee_test.go index b0bbe42273..bc2721ebd4 100644 --- a/services/issue/assignee_test.go +++ b/services/issue/assignee_test.go @@ -9,6 +9,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/unittest" + "github.com/stretchr/testify/assert" ) diff --git a/services/issue/label_test.go b/services/issue/label_test.go index fa6ad613b6..fdc2c4ffb6 100644 --- a/services/issue/label_test.go +++ b/services/issue/label_test.go @@ -9,6 +9,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/unittest" + "github.com/stretchr/testify/assert" ) diff --git a/services/repository/fork_test.go b/services/repository/fork_test.go index 197d76b056..1280a3d84d 100644 --- a/services/repository/fork_test.go +++ b/services/repository/fork_test.go @@ -9,6 +9,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/unittest" + "github.com/stretchr/testify/assert" ) diff --git a/services/webhook/deliver_test.go b/services/webhook/deliver_test.go index cfc99d796a..551c957c8d 100644 --- a/services/webhook/deliver_test.go +++ b/services/webhook/deliver_test.go @@ -10,6 +10,7 @@ import ( "testing" "code.gitea.io/gitea/modules/setting" + "github.com/stretchr/testify/assert" ) diff --git a/services/webhook/webhook_test.go b/services/webhook/webhook_test.go index 0a649d36ae..c332332787 100644 --- a/services/webhook/webhook_test.go +++ b/services/webhook/webhook_test.go @@ -11,6 +11,7 @@ import ( "code.gitea.io/gitea/models/unittest" webhook_model "code.gitea.io/gitea/models/webhook" api "code.gitea.io/gitea/modules/structs" + "github.com/stretchr/testify/assert" ) |