SCard gets the cardinality (size) of a set
(key string)
| 91 | |
| 92 | // SCard gets the cardinality (size) of a set |
| 93 | func (s *SetStructure) SCard(key string) (int, error) { |
| 94 | fs, err := s.checkAndGetSet(key, false) |
| 95 | if err != nil { |
| 96 | return -1, err |
| 97 | } |
| 98 | return len(*fs), nil |
| 99 | } |
| 100 | |
| 101 | // SMembers gets all members of a set identified by the provided key. |
| 102 | // If the set does not exist or the key belongs to a different data type, |
nothing calls this directly
no test coverage detected