MCPcopy Index your code
hub / github.com/dearcode/candy / getGroups

Method getGroups

store/user.go:392–406  ·  view source on GitHub ↗
(userID int64)

Source from the content-addressed store, hash-verified

390}
391
392func (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}

Callers 1

LoadGroupListMethod · 0.80

Calls 1

UserGroupRangeFunction · 0.85

Tested by

no test coverage detected