chore(models): rewrite code format. (#14754)

* chore: rewrite format.

* chore: update format

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* chore: update format

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* chore: Adjacent parameters with the same type should be grouped together

* chore: update format.
This commit is contained in:
Bo-Yi Wu 2021-03-15 02:52:12 +08:00 committed by GitHub
parent 164e35ead3
commit 167b0f46ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
103 changed files with 474 additions and 460 deletions

View file

@ -36,7 +36,7 @@ func TestUserIsPublicMember(t *testing.T) {
}
}
func testUserIsPublicMember(t *testing.T, uid int64, orgID int64, expected bool) {
func testUserIsPublicMember(t *testing.T, uid, orgID int64, expected bool) {
user, err := GetUserByID(uid)
assert.NoError(t, err)
assert.Equal(t, expected, user.IsPublicMember(orgID))
@ -62,7 +62,7 @@ func TestIsUserOrgOwner(t *testing.T) {
}
}
func testIsUserOrgOwner(t *testing.T, uid int64, orgID int64, expected bool) {
func testIsUserOrgOwner(t *testing.T, uid, orgID int64, expected bool) {
user, err := GetUserByID(uid)
assert.NoError(t, err)
assert.Equal(t, expected, user.IsUserOrgOwner(orgID))
@ -338,7 +338,6 @@ func TestCreateUserInvalidEmail(t *testing.T) {
}
func TestCreateUser_Issue5882(t *testing.T) {
// Init settings
_ = setting.Admin
@ -369,13 +368,12 @@ func TestCreateUser_Issue5882(t *testing.T) {
}
func TestGetUserIDsByNames(t *testing.T) {
//ignore non existing
// ignore non existing
IDs, err := GetUserIDsByNames([]string{"user1", "user2", "none_existing_user"}, true)
assert.NoError(t, err)
assert.Equal(t, []int64{1, 2}, IDs)
//ignore non existing
// ignore non existing
IDs, err = GetUserIDsByNames([]string{"user1", "do_not_exist"}, false)
assert.Error(t, err)
assert.Equal(t, []int64(nil), IDs)