(key string, createIfNotExist bool)
| 304 | } |
| 305 | |
| 306 | func (s *SetStructure) checkAndGetSet(key string, createIfNotExist bool) (*FSets, error) { |
| 307 | // Check if value is empty |
| 308 | if err := checkKey(key); err != nil { |
| 309 | return nil, err |
| 310 | } |
| 311 | keyBytes := stringToBytesWithKey(key) |
| 312 | // Get the list |
| 313 | set, _, err := s.getSetFromDB(keyBytes, createIfNotExist) |
| 314 | if err != nil { |
| 315 | return nil, err |
| 316 | } |
| 317 | |
| 318 | return set, nil |
| 319 | } |
| 320 | |
| 321 | // internal/private functions |
| 322 |