(userID int64)
| 390 | } |
| 391 | |
| 392 | func (u *userDB) getGroups(userID int64) ([]int64, error) { |
| 393 | start, end := UserGroupRange(userID) |
| 394 | |
| 395 | var ids []int64 |
| 396 | it := u.db.NewIterator(nil, nil) |
| 397 | for ok := it.Seek(start); ok; { |
| 398 | ids = append(ids, util.DecodeInt64(it.Value())) |
| 399 | |
| 400 | ok = it.Next() && bytes.Compare(end, it.Key()) >= 0 |
| 401 | } |
| 402 | |
| 403 | it.Release() |
| 404 | |
| 405 | return ids, nil |
| 406 | } |
no test coverage detected