Skip to content

Commit 703864e

Browse files
committed
Fix lint
1 parent 223e4b9 commit 703864e

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

models/user/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ func UpdateUserCols(ctx context.Context, u *User, cols ...string) error {
885885

886886
// GetInactiveUsers gets all inactive users
887887
func GetInactiveUsers(ctx context.Context, olderThan time.Duration) ([]*User, error) {
888-
var cond builder.Cond = builder.And(
888+
cond := builder.And(
889889
builder.Eq{"is_active": false},
890890
builder.Or( // only plain user
891891
builder.Eq{"`type`": UserTypeIndividual},

models/user/user_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,6 @@ func TestGetInactiveUsers(t *testing.T) {
597597
users, err := user_model.GetInactiveUsers(db.DefaultContext, 0)
598598
assert.NoError(t, err)
599599
assert.Len(t, users, 1)
600-
fmt.Println("ddd", time.Now().Unix())
601600
interval := time.Now().Unix() - 1730468968 + 3600*24
602601
users, err = user_model.GetInactiveUsers(db.DefaultContext, time.Duration(interval*int64(time.Second)))
603602
assert.NoError(t, err)

0 commit comments

Comments
 (0)